How to set system language and other regional settings
You can add more languages to your system easily and change regional formats independently to language.
sudo dpkg-reconfigure localesand follow the steps. You may need to reboot or log out.
- Add languages by editing
/etc/locale.gen. Uncomment the languages you want to install.
... #en_SG ISO-8859-1 en_US.UTF-8 UTF-8 #en_US ISO-8859-1 ...
locale-gento load those languages.
$ sudo locale-gen Generating locales... en_US.UTF-8... done es_ES.UTF-8... done Generation complete.
- Set your system language by editing
LANG=and the language code.
Set keyboard layout
- To set your keyboard layout, run
sudo dpkg-reconfigure keyboard-configuration. You may need to reboot or log out.
To set your keyboard layout, edit
localectl set-x11-keymap <keymap>to set keyboard layout for X11.
Changes will take effect in next boot.
Other regional parameters
You may need to change some regional parameter like date format or measurement units. You can do it by adding more lines to
/etc/locale.conf with the region you want to use for every parameter, for example:
LANG="en_US.UTF-8" # This will allow to use millimeters instead of inches LC_MEASUREMENT="es_ES.UTF-8" # This will allow to use A4 instead of US letter LC_PAPER="es_ES.UTF-8" # This will make Monday the first day of the week (may change week day language) LC_TIME="es_ES.UTF-8"
If you want to change language settings on a user-level, you can edit your
~/.bash_profile and add the environment variables.
LANG="en_US.UTF-8" export LANG
If you have any suggestion, feel free to contact me via social media or email.