ACPI administration advocacy advocacy advocacy opinion alsa amarok apache apple apt aptitude audio audo authentication automount avi awk bash BIOS boot business cache calendar calibre censorship commandline computerscience console cron cut database date debian degree design desktop development disk dpkg dvd economics education emacs email europe exim faad ffmpeg files firefox firewall flash foss freedom ftp fun fuse git gnumeric grep growisofs grub gtkpod hardware hardware html idiocy images installation ip iphone ipod iptables iso itunes ivman kde kernel keyboard knoppix lame laptop latex linux locale lockin longlines m4a microsoft mimetypes minitab mount mp3 mp4 mplayer multimedia music mysql network nfs nfs4 nmap openbox openoffice opinion opinion partition pdf perl php politics postgresql printing privacy programming rant remote rhythmbox rss rsync rxvt scp script scripting scsi security sed server shell siteadmin sitenews sitesoftware skype skype slackware sound sox spam spreadsheet ssh statistics subversion sudo svk swap t23 t43 terminal text thinkpad thunderbird time timezone ubuntu udev upgrade usb usbmount users uuid versioncontrol vfat video vnc windows wine wordpress wordprocessing X40 xwindows xwindows youtube
The 'locale' system on every Linux computer is a way of customising the way certain things work.
It determines how numbers and currencies should be displayed, sets the paper size for printing, and the formats for time and date, amongst other things. In short, the 'locale' is a way to ensure a computer respects certain practices in certain countries or language communities.
The 'locale' system forms part of glibc, the GNU C Library, which is at the base of many pieces of software.
Like everything in Linux, it is possible to change the 'locale' files to suit particular tastes or practices. You might want to do this if, for example, you don't like the way dates are displayed.
I found that the information out there about locales and how to change is fairly sparse. Here I've gathered what I've found.
On Debian systems and perhaps most other forms of Linux, the local files are in /usr/share/i18n/locales/. All locales are named in the following way: xx_YY, where xx is a two character name for a language and YY is the two character name for a country. So en_US, will be the locale for English in the US, en_GB the locale for English in Great Britain and cy_GB the locale for Welsh spoken in Great Britain.
Typing 'locale' at the command prompt will give you a list of certain environment variables and their locale settings. The environment variable LC_TIME determines how the time is displayed, whereas the environment variable LC_NUMERIC determines how numbers are displayed, for example, what characters to use for the decimal point and thousands seperator.
If you use the 'locale' command with the 'k' switch, say locale -k LC_NUMERIC, you will get a list of names and values for select keywords. For example, if your locale is en_GB, the decimal_point keyword will be set to '.', whereas if your locale is set to fr_FR, it will be set to ','.
Why I got interested in locales was because of the way that dates were being displayed in the cs_CZ locale.
How dates and times are displayed is determined by the LC_TIME environment variable. The settings can be determined by doing locale -k LC_TIME. The settings that interested me are as follows:
The best way to change a locale, at least on my system, is to create a custom locale, using a file name containing '@'. So, if you want to amend the en_GB locale you copy it to something like en_GB@custom, then edit it.
There are a few notes on what to do here. These are the steps I recommend:
Now, you can set the custom locale as your default or put it in your profile file on a per user basis, or just at the command line: export LC_TIME=en_GB.utf8@custom.
More information: