Reputation: 329
I have an app that's translated into ~10 languages. Of course we try to keep the translations up-to-date but it's never perfect, many are community-contributions, and we often release updates with translations that are only at various levels of (in)completeness (say 80%).
So missing translations are a fact of life. By default gettext
falls back to the source language (English) when a translation is not available.
I have translations for pt_PT, pt_BR, and es_ES among others. In that case I think it would be preferable to fall back
My questions are
I saw gettext: How to fall back to the base language? talks about fallback Czech->Slovak->English and Gettext fallbacks don't work with untranslated strings talks about fallback Spanish->English->Russian.
Upvotes: 1
Views: 427
Reputation: 2340
The exact answer depends on how exactly you are retrieving translations.
If you are using a GNU gettext compatible framework, setting the environment variable LANGUAGE
, maybe in combination with LANG
. Try this:
export LANGUAGE=pt_BR:pt_PT:pt:es_ES:es:en
export LANG=pt_BR
You can find more details in the file ABOUT-NLS
which gets installed with internationalized packages, or online for example at http://www.sensi.org/~alec/locale/other/about-nls.html.
Upvotes: 0