en and en_us
when en_us is selected as the language in the language popup menu in moodlecloud, the multilang filter displays the entry for the first language in the entry not the default language.
To be more verbose:
I have span tags for de and en in a field. When de or en is the active language, the content is displayed as expected. When en_us is the active language, I see the text for de not en -- en should be shown because it is both the parent language and the default language for this site.
If I add a span block for pl before the span block for de, then the Polish text is shown when the active language is en_us. pl is shown as expected when pl is the active language.
What is going on ???
Thanks for raising this Robert. Reading the code, I have a suspicion. The English (en) is implicit parent of all language packs in Moodle (so if a string is not translated, the English original is used). In most places in the code, if the parent language is reported to be English (en), it is actually interpreted as if there was no parent language. And I believe this is what is happening here.
The code here https://github.com/moodle/moodle/blob/v3.1.1/filter/multilang/filter.php#L101-L108 finds that there is no "en_us" multilang part defined and it does not use the "en" part as expected, but it uses the first one on the list.
As a solution, I would recommend to use the English part as the first one in the multilang block.
I just filed a tracker issue for this: MDL-55197
Just wondering if you installed Moodle 3.1. We are having some issues between UK English and US English for words such as "enrolled" and "enroled." I am wondering if you have examined the issue you reported in 2.9 on 3.1?