|
|
| Changing locales in Ubuntu |
|
|
|
| Written by Bart Dorlandt |
| Tuesday, 12 January 2010 15:04 |
|
The following peace is copied from http://blog.bigsmoke.us/2009/06/16/adding-locales-in-ubuntu. --------------------------- I wanted the dates on my Kubuntu system to be shown as Dutch dates. Therefore, I needed to add a locale. The place to do it is in /var/lib/locales/supported.d/local. It now contains this: en_US.UTF-8 UTF-8 Then run locale-gen to generate the locales. Set the following environment vars (in profile or something) to let everything behave properly: export LANG="nl_NL.UTF-8" I don’t know anymore why I chose this specific configuration. I guess this means that everything, from thousand and decimal separators to dates is Dutch, and messages are English. I don’t know, however, why the collate is C. I vaguely remember something about it otherwise not including some characters in the sorting, causing weird sorting in words with dashes and such. --------------------------- I have created my own solution around it: Because I have my profiles (of bash) within my SVN repository, I'm able to access them on all my machines (and others). Because the export function only works correctly and without errors when the locales are specified my scripts make sure it exists. My root .bash_aliases has the following at the end of the file: # add "nl_NL.UTF-8 UTF-8" to /var/lib/locales/supported.d/local So it will write to the file if it doesn't has the NL locale yet. After that the bash will do the exports. For my normal user, my .bash_aliases has the following: # add "nl_NL.UTF-8 UTF-8" to /var/lib/locales/supported.d/local It will check for the NL locale and if it exists it will export it. Never have to worry about that again. Even after a re-install...
Set as favorite
Bookmark
Email This
Hits: 668 Trackback(0)
Comments (0)
![]() Write comment - Name & Email obligated
|
| Related items: |
|---|
|




