GNOME Bugzilla – Bug 664723
Allow to set multiple preferred languages
Last modified: 2021-06-09 16:33:47 UTC
This request may seem of minor importance to English speaking developers, but it would help greatly to a number of non-English GNOME users. I'll try explain carefully. It is quite common that a user understands some other non-native language far better than English. Such user would appreciate a different l10n fallback than just default "native language -> English". Use case 1: * A user may Polish, speak very well German, but just a bit English. This user would like to have following l10n fallback: Polish -> German -> English Use case 2: * 100% Slovaks can understand Czech almost flawlessly, but they don't understand English very well. Because Gnome is translated into Slovak just from 60%, but it's translated into Czech from 100%, Slovaks would appreciate following l10n fallback: Slovak -> Czech -> English Currently GNOME Control Center does not offer this possibility. However, this option is already available for all gettext-based programs through the LANGUAGE environmental variable. For the previous use case it's enough to define LANGUAGE=sk_SK:cs_CZ:en_US and it uses Slovak -> Czech -> English fallback. This variable can be set system-wide at /etc/locale.conf or /etc/sysconfig/i18n (on Fedora) and also per-user at ~/.i18n. Please implement this option also at GNOME Control Center. Allow user to set multiple languages preference by shuffling them according to his/her preference. Allowing users to have more languages in localization fallback will result in GNOME being accessible to larger non-English speaking audience.
The LANG variable already allows that, and there is a new design in the region panel to allow setting several languages by order of importance, so yes, hopefully this will be in 3.4. We'll see if we can come up with a good design for this, as the only previous art is Ubuntu's language-selector, and this feature is quite confusing for lots of users.
LANG doesn't allow it, LANGUAGE does. However, I think that a preference order for languages is a weird thing to expose in the user interface. I'm not in favour of it. If a translation is not complete, it needs to be completed, instead of adding kludges like this.
Yes right, it's LANGUAGE, not LANG. And I agree it's a weird thing. As I mentioned, the Ubuntu's language-selector provides this feature and it's been quite confusing to lots of users.
It's easy to say "the translation must be completed", but for some languages it's just not real (too few translators). Is having half of the programs showing in Polish and the rest in English more weird than having half of the programs showing in Polish and the rest in German? It's seems the same "suboptimal" for me, it just swaps the "fallback language". But the latter case may be preferred by a number of users. Some languages are also extremely similar (like Czech and Slovak). It is of course possible that Slovaks use Czech localization. But having 60% of programs in Slovak and the rest in Czech is just more pleasant. If you decide that the multiple-language priorities are too confusing, please consider a simplified proposal: Allow to set TWO languages - the default one and the "fallback" one. The fallback language basically allows to swap (currently forced) English default for some other language. The UI should be quite easy to do. If it is technically possible you can allow only languages with >=95% translation completeness (or similar) to be selected as the fallback language. I believe the simplified proposal satisfies still satisfies the majority of use cases I described.
Maybe something that could be tested in gnome-tweak-tool? - though it would probably need a desktop restart to take effect.
I think Ubuntu considers this a blocker to dropping language-selector and adopting the full region panel; it would at least be a regression if there were no longer a GUI for this. In Tunisia for example, Arabic is the main language but French is the common secondary language. According to Damned Lies, GNOME 3.6 is only 78% translated for Arabic but French is virtually complete. I've noticed that Brazilian Portuguese tends to be a bit more complete than Portuguese. I've always thought it would be cool if Portuguese would automatically fall back to Brazilian (even though that's the reverse of how I think it usually works). I think a single fallback option as proposed in comment 2 would be sufficient for most people (and more than one fallback would probably be too confusing especially as I believe English is a hard-coded final fallback). We could be especially smart and also try to automatically set the fallback to the right thing for countries/languages we know about (Slovak>Czech, Tunisia Arabic>French, Portuguese>Brazilian, etc.).
We can argue against this saying "we should just have complete translations" but that's not particularly practical and it becomes even less practical when we consider wanting to ship 3rd party apps. It's quite unlikely that these will be fully-translated into all the languages in the world (or even all the languages that GNOME is reasonably well-translated for). Having a fallback (that isn't hardcoded to English) is important for this reason as well. Another fun example: a French guy who is learning Esperanto (which has only a partially-completed translation). Why should he ever have to see English strings?
There is an important aspect that hasn't been mentioned so far: Only GNU applications understand the LANGUAGE environment variable. In other words, very important applications that are shipped with e.g. Ubuntu, such as Firefox/Thunderbird and LibreOffice, lack the ability to use other fallback languages but English anyway. Personally I used to think that a UI for managing the LANGUAGE priority list should be added to "Region & Language", but I'm not sure any longer. It would be a challenge to design such a UI so it wouldn't be hard to understand for some. The idea mentioned above with only setting one fallback language sounds as an interesting compromise. The design of such a feature would be much easier. "If the translation into the language of your choice isn't complete, try ... instead." I kind of like that.
> There is an important aspect that hasn't been mentioned so far: Only GNU > applications understand the LANGUAGE environment variable. To clarify that: interpreting LANGUAGE is a feature of GNU gettext. You don't have to be a GNU application to benefit from that - its enough to use gettext on a glibc-based system. But indeed, neither firefox nor libreoffice do so.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new bug report at https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/ Thank you for your understanding and your help.