Saturday, September 8, 2012

Linux TIP : Run an application in a different Language

Sometimes you may need to run an application in different languages, real easy to do with Linux, won't be permanent so you can get back to your initial language.

Here's how:

1. First locate the language locale you want, let's say you want US English, use the command "locale -av" and locate the section you need:

# locale -av

Output example:

locale: en_US.utf8      archive: /usr/lib/locale/locale-archive
    title | English locale for the USA
   source | Free Software Foundation, Inc.
  address | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    email |
 language | English
territory | USA
 revision | 1.0
     date | 2000-06-24
  codeset | UTF-8

2. Open a terminal, you will open your application within this terminal, that way all of your system won't affected but just the application you want

3. Change your locale environnement var  "LC_MESSAGES" to the locale value, in our example:

$ export LC_MESSAGES=en_US.UTF-8

4. Open your application, language should be US

5. To revert, nothing to do, just close your terminal an re-open the application

Note: For this to work on some application, you may have the install the language associated package.
If this does not work, you may lack a language package.

You can also have to deal with "LANG" var, just test.