How to set system language for only one user

I'm preparing a machine for my mom's computer. She likes to use the computer in German. I work in English, as I usualy don't like the translations and am confused by them. As I'm administrating that machine and English is the computer language for me, I tried to set it in English for me and in German for her.

It happens that this setup is not usual. Looks like most people use single user machines and set the default language to what they want. And there are warning that the multi-user case is not working well.

Here is the solution I found:

First, install the localisation packages. (The ones containing l10n in the package names for the language you want). In aptitude, there are specific localisation tasks. Create the locales for the languages by running

dpkg-reconfigure locales

as super-user, and select the languages you want. Remember the name of the locale, or you can check the available locales on your system with locale -a.

Then, get the programs to change the language: as I'm using KDE on that machine, the settings for all KDE programs can be set in the "System Settings". But this doesn't account for other programs, like Iceweasel (Firefox) and OpenOffice. These seem to depend on the LANG, LANGUAGE and LC_ALL variables. They are usually set in the user's shell. So if you run programs from a shell, you can set them in .bashrc for the user. But that won't change the language for the programs run from X. What I found is that kdm, gdm and xdm source .profile.

So you can add your languages environement variables in there:

export LANG=de_CH.utf8
export LANGUAGE=de_CH
export LC_ALL=de_CH

Then, logout and login again, and it should be set.

  • Created: 12/02/12 09:58
  • Modified: 12/02/12 09:58