-
Improvement
-
Resolution: Fixed
-
Minor
-
3.9.3, 3.10, 3.11, 4.0, 4.1, 4.4.3
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_404_STABLE
-
MOODLE_500_STABLE
-
-
-
Issue Description
When creating multi-language Moodle sites with more than just a few languages, the current 254/255 character limit is not enough. This is barely enough for sites with 2 languages where you are left with about 82 characters per language after you included the 2 sets of opening and closing HTML SPAN multilang tag wrappers at 42-45 characters each.
What is needed is to remove or significantly expand the current character limit for fields with a 254/255 character limit in order to be able to support more languages in a course name.
Why this is needed
Let's say I want to create Moodle site where individual course are available in 3 languages. This is often desirable over having multiple single language courses because it allows you to switch language at any point during the course.
That would limit you to 84 characters per language. However, after factoring in the SPAN multilang tags (about 45 characters per language), you are actually left with an average of just 39 characters for the course fullname and shortname which is pretty tight.
To support 4 languages is not reasonable leaving you with just 18-20 characters per language for course names. 5 languages and up is not feasible (5 characters or less per course name).
Other fields in Moodle are also too short
This field size limitation does not only affect course fullname and shortname fields. There are other fields in blocks, activities, etc. which could also benefit from overcoming the 254 character limitation. However, I propose that these be identified and dealt with individually in order to keep development and testing manageable.
Unfortunately it is not likely to be enough to just modify the course edit form and expand the size of the field in the database. The scope of such modifications are likely to also impact course backup/restore, course request, mnet and more.
Moodle v4.0 might be a good time to improve Moodle support for multi-languages.
Workaround
It is possible to squeeze an extra language in using the 3rd party Multi-Language Content (v2) filter instead of the Multi-Language Content filter which comes bundled with Moodle. Its {mlang} tags require a little less than half the space of the SPAN tags but that still won't be enough if you are trying to get 9 languages going on your site.
Alternatively, at least in the case of a course full name, you could use a custom course field and refer to it filters like FilterCodes.
Discussions
You can find some past discussion surrounding this issue in the following forum thread:
- has a non-specific relationship to
-
MDL-83036 Increase course shortname database field length beyond 255 characters
-
- Closed
-
- has been marked as being related by
-
MDL-80584 Reduce the maximum characters length of the Site shortname
-
- Open
-
-
MDL-84763 Increase length of custom category/field "name" fields
-
- Waiting for peer review
-
-
MDL-77050 Increase the number of characters in the tables to allow multinlingual with mlang tags
-
- Closed
-
-
MDL-80872 Unable to translate catalog sections for more than 3 languages - name field too short
-
- Closed
-
-
MDL-83985 Increase activity name database field length beyond 254 characters
-
- Closed
-
- is duplicated by
-
MDL-77041 Increase character limit for multilanguage support
-
- Closed
-