Small tip about locale on Ubuntu-server

Mar 24, 2010 20:22

To check current locale just run:
:~# locale
LANG=C
So current locale is 'C'.
To add support of another locale we should change /var/lib/locales/supported.d/locale or create it if it doesn't exist. For example, to add US English UTF-8 locale we need to add following line:
en_US.UTF-8 UTF-8
(You can see supported locales at /usr/share/i18n/SUPPORTED)
Regenerate the supported locales then run:
# dpkg-reconfigure locales
Ensure that it was completed successfully.
Generating locales...
en_US.UTF-8...
Generation complete.
And the last step is to change system default locale at /etc/default/locale to something like
LANG="en_US.UTF-8"
Restart. Profit!
See also: http://ubuntuforums.org/archive/index.php/t-7331.html

tips, linux, ubuntu

Previous post Next post
Up