Thursday, November 25, 2010

Set locale in Arch

Set locale in Arch:
irst you have to enable the locales you want being supported by your system. To enable or disable them, the file /etc/locale.gen is used. It contains every locale you can enable, and you have just to uncomment lines you want to do so.

As we want to setup an English UTF-8 conform system, we want to enable en_US.UTF-8. But for compatibility to programs that don't support UTF-8 yet, it's recommended to support any other locale, prefixed with en_US as well. Having this in mind, we enable this set of locales:

en_US.UTF-8    UTF-8
en_US ISO-8859-1

After you've enabled the necessary locales, you have to run locale-gen as root to update them:

# sudo locale-gen
Generating locales...
en_US.UTF-8... done
en_US.ISO-8859-1... done
Generation complete.

Setting system wide locale

To define which locale should be used by the system, you can easily add your locale to your /etc/rc.conf file. As we've just added ISO-8859 support just for (backward-)compatibility, we add en_US.UTF-8 here:

LOCALE="en_US.UTF-8"

The system wide locale will be updated after rebooting your computer.

Setting per user locale

As we discussed earlier, some users might want to define a different locale than the system-wide locale. In this case, you can export LANG in your ~/.bashrc. For example you can use the en_AU.UTF-8 locale.

export LANG=en_AU.UTF-8

Your locales will be updated as soon as you re-source your ~/.bashrc. This happens on login or alternatively you can type:

$ source ~/.bashrc

found this here:https://wiki.archlinux.org/index.php/Locale#Enabling_necessary_locales

No comments:

Blog Archive

About Me

Exclusion of liability Regarding StillStupid: The use you make of the guides, tips and downloads that you listed on this web site or on another website to which I refer is entirely at your own risk. In no way can I be held liable for damage or consequential damages of any kind, which occurs as a result of that use.