Translated using DeepL

Machine-translated page for increased accessibility for English questioners.

Setting the language and national environment

On Linux systems it is possible to set many aspects of localization besides language - the format of numbers, date and time, alphabetization, units, etc. - collectively called locale.

Locale is set in aggregate or in components by environment variables. These variables and their current settings can be viewed using the command locale.

Settings via the graphical tool

In the default graphical environment (GNOME), the language can be changed via the system setup application. This setting will not affect the language on servers (e.g. Aisa) and it is not possible to set different localization categories to different values.

The GNOME settings store the chosen language in a file ~/.pam_environment, where some localization categories can therefore be changed. The settings in this file are only used on the classroom and hall stations, not on the servers.

Manual setting of environment variables

You can export language variables directly in the ~/.bashrc file (or another file that is read at login, such as ~/.profile). Typically, you will want to set the variable LANG. So you would put the command in the file:

  • for Czech: export LANG=cs_CZ.UTF-8
  • for English: export LANG=en_US.UTF-8

You can also choose another language; the available languages can be listed with the command locale -a. Note that you should always use the option ending with the string ".UTF-8". This is the encoding currently expected everywhere; the other options are historical and would cause problems in various places, e.g. with accents.

Similarly, the LC_* variables can be set to have a higher priority than the settings in LANG.

The highest priority variable is LANGUAGE, which is also set by the GNOME Control Center. On graphics stations, the setting of other variables is therefore overridden by this. This can be prevented by deleting it with the command

export LANGUAGE=