We use only two-digit languages for associating with countries and setting as the global language, but when there are country-specific languages, e.g., fr-CA, that have translations, those translations won't display.
What we need is the ability to implement a hierarchy of languages, such that translations will be loaded in order: use fr-CA if it exists, otherwise fr.
To do this, probably we need support in i18nstrings.
Comments
Comment #1
nedjoPosted a draft patch to i18n: #325936: Language fallbacks when fetching translations.
Comment #2
robeano commentedHi Nedjo,
What happens if you don't have something translated in fr-CA or fr, then what is your fallback? How do you determine the fallback order?
Comment #3
elysch commentedHi.
Sorry to meddle in.
But I've seen in other programs that, if the program was created in English, then the last resort to find a string is always English.
The order should always be from particular to general. What I mean is that you try with the strings from the specific country, if not found, you try with the strings of the language in general, and if not found either one, then use the original string. (in this case, I guess it's English)
For example, the program should try to find the string in this order:
fr-CA
fr
en
Do you agree?
Ely.
Comment #4
nedjoPostponed until #326726: Refactor to set global langauge to country-specific version? is addressed.
@elysch: thanks for your comment, I'll return to this when reopening the issue.