fallback when searching for translations


I would like to see some kind of fallback mechanism when translation messages and views are searched for. According to documentation and function comments we are encouraged to use canonical ll_RR format (l - language, R-region). That’s great, because we can benefit from CLDR localization data. However, one may want to use exactly the same translation for 2 or more different regions and in such case we have to create either copies of the same files or symlinks.

For example pl_pl, sk_sk, en_gb, en_nz and en_us locales may be used by application. Now I have to create views folders like this:




en_gb->en (symlink)

en_nz->en (symlink)

en_us->en (symlink)

so I can benefit from both i18n and l10n. It would be much easier if in case when canonical folder/file name is not found, language only code is looked for. In such case I could set only en, pl and sk directories without creating symlink for every region given language is spoken in.

Also in case when we do have different translations for different locales fallback mechanism would help a lot, because there are always some common parts, which can land in language code only directory, and rest in their own canonical form named folders…