Tech Blog‎ > ‎

Mixed locale in Ubuntu

lähettänyt Jukka Niiranen 5.12.2010 klo 5.44   [ 5.12.2010 klo 6.24 päivitetty ]
- 5. Dec 2010 -

Ubuntu is lovely system, as separate users can have different language graphical user interfaces (GUI) on one and a same computer. I wonder when - for example - the international hotels will have enough sense to upgrade the operating systems (OS) of their business centre computer to Ubuntu. What I mean is that let's say you are a Spaniard or a Dutchman or an Englishman and you are visiting for example Finland or China. My guess is that you wouldn't much benefit from a computer running Finnish or Chinese operating system, would you? While a computer with Spanish, Dutch or English OS would be much much more beneficial for you. Of course majority of public computer do already run an English language OS, but not all and most certainly using one's mother tongue would offer even better service.

Anyhow, I personally like to run my desktop in English (UK) and receive the system's feedback in English. There are basically two reasons for this. Firstly I've been used to it and secondly it's much more easy to find additional information and help from the Internet if the search terms are in English instead of Finnish. But even though I like to have my desktop in English, the system must use metric measurements, A4 paper size, comma as decimal separator, 24 hour clock and DD.MM.YYYY date format among other things. In some cases setting this up has been a chore, but now I found a solution for this!

In Ubuntu 10.10 there is a graphical user interface menu option: System -> Administration -> Language support , which should be quite enough for majority of the users. There one can set his/hers locale.

But there is also another way to set the locale setting just the way you like. Unfortunately this requires using console, but not to worry, job is easy and quickly done!

To see your current locale settings, use command:

locale

And to change the settings one has to modify the file: /etc/default/locale by using:

sudo pico /etc/default/locale

This is how my /etc/default/locale looks like:

LANG="en_GB.UTF-8"
LANGUAGE="en_GB.UTF-8"
LC_CTYPE="fi_FI.UTF-8"
LC_NUMERIC="fi_FI.UTF-8"
LC_TIME="fi_FI.UTF-8"
LC_COLLATE="fi_FI.UTF-8"
LC_MONETARY="fi_FI.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="fi_FI.UTF-8"
LC_NAME="fi_FI.UTF-8"
LC_ADDRESS="fi_FI.UTF-8"
LC_TELEPHONE="fi_FI.UTF-8"
LC_MEASUREMENT="fi_FI.UTF-8"
LC_IDENTIFICATION="fi_FI.UTF-8"

So everything else is "fi_FI.UTF-8" (=in Finnish), but LANG, LANGUAGE and MESSAGES parts. This gives me an English language desktop with dates, decimal separators, time / calendar etc. as they should be in Finland.

Known "issues":
  • The Ubuntu's Places menu has now the first two items "Home Folder" and "Desktop" in English and the rest of the items in Finnish (Documents, Music etc.) All links work ok, but if you open the "Home Folder", there is no Desktop folder in there, but a folder called "Työpöytä" (=desktop in Finnish). Rest of the GUI is in English as expected.
  • Date in Clock applet is shown in Finnish, it looks a bit 'out of place' in English language environment, but this was my goal at the beginning.

These two sites offered me valuable information on this topic:
https://help.ubuntu.com/community/Locale
http://ubuntuforums.org/showthread.php?t=1196016


Operating system used: Ubuntu 10.10, Maverick Meerkat, 64bit.
Comments