HI all,
I have recently moved from Ubuntu to Debian and have problems setting languages per user. I've tried changing the LANG env-var in .profile and .bashrc and have "nice" output of the locale command (showing all changed how I want it), but there are still only a few string / messages translated. The translation appears to be very partial, in comparison with the same DE (in my case XFCE) and common apps (browsers, LibreOffice, etc.) in Ubuntu. Why?
How can I change language per user for terminal, desktop environment and all applications?
In Ubuntu, there is a language pack manager which can install packages for several languages (I've tried to install multiple locales on Debian) and it is possible to prioritize them and achieve a sort of "cascaded" translation, i.e. if some message is not translated in language #1, it looks up translation in language #2, then #3, etc. with a fallback into English if no translation was found in any languages with higher priority. This is very useful to do with mutually intelligible languages. How can I achieve similar behavior in Debian?
Many thanks in advance for your suggestions.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Switching languages per user and "cascading" translations
Re: Switching languages per user and "cascading" translation
From man locale:cupakm wrote:HI all,
I have recently moved from Ubuntu to Debian and have problems setting languages per user. I've tried changing the LANG env-var in .profile and .bashrc and have "nice" output of the locale command (showing all changed how I want it), but there are still only a few string / messages translated. The translation appears to be very partial, in comparison with the same DE (in my case XFCE) and common apps (browsers, LibreOffice, etc.) in Ubuntu. Why?
How can I change language per user for terminal, desktop environment and all applications?
In Ubuntu, there is a language pack manager which can install packages for several languages (I've tried to install multiple locales on Debian) and it is possible to prioritize them and achieve a sort of "cascaded" translation, i.e. if some message is not translated in language #1, it looks up translation in language #2, then #3, etc. with a fallback into English if no translation was found in any languages with higher priority. This is very useful to do with mutually intelligible languages. How can I achieve similar behavior in Debian?
Many thanks in advance for your suggestions.
Code: Select all
The following example compiles a custom locale from the ./wrk directory
with the localedef(1) utility under the $HOME/.locale directory, then
tests the result with the date(1) command, and then sets the environ‐
ment variables LOCPATH and LANG in the shell profile file so that the
custom locale will be used in the subsequent user sessions:
$ mkdir -p $HOME/.locale
$ I18NPATH=./wrk/ localedef -f UTF-8 -i fi_SE $HOME/.locale/fi_SE.UTF-8
$ LOCPATH=$HOME/.locale LC_ALL=fi_SE.UTF-8 date
$ echo "export LOCPATH=\$HOME/.locale" >> $HOME/.bashrc
$ echo "export LANG=fi_SE.UTF-8" >> $HOME/.bashrc
This question has been asked a few times here, it is good habit to search before posting.
Re: Switching languages per user and "cascading" translation
op's second question doesn't seem to have been answered at all, and i have never seen it on any forum.
i didn't know something like this was possible at all; i thought english was always the fallback language for partial translations.
i didn't know something like this was possible at all; i thought english was always the fallback language for partial translations.
Re: Switching languages per user and "cascading" translation
The LANGUAGE environment variable supports this, with alternatives separated by colons. There are many places you might set this, but for example, in ~/.xsessionrc:cupakm wrote:...multiple locales on Debian) and it is possible to prioritize them and achieve a sort of "cascaded" translation, i.e. if some message is not translated in language #1, it looks up translation in language #2, then #3, etc. with a fallback into English if no translation was found in any languages with higher priority.
Code: Select all
export LANGUAGE=ja_JP:it_IT:en
Re: Switching languages per user and "cascading" translation
Thanks! That was exactly what I was looking for!johnraff wrote:The LANGUAGE environment variable supports this, with alternatives separated by colons.