Localized version in the console? No thanks!

Posted on 20.10.2009 by Kim N. Lesmer.
If you are running a Linux distribution or a BSD flavor on your PC and have installed it in your native language (in this case not English), most console applications will be running in that language. What do you do if you don't want that for each application but only for some?

If you are running a Linux distribution or a BSD flavor on your PC and have installed it in your native language (in this case not English), most applications will be running in that language.

Some applications haven't been translated yet, and of course they will not be running in your native language. Other applications has language specific files for you to install such as OpenOffice for example, and in this case you can choose whatever language you prefer.

I often run console applications, and I actually prefer console applications to be in English. Many times the application will print some kind of message to the screen, and even though the people working on translations do their best, such messages often doesn't make any sense in a translated version.

Especially when it comes to error messages. Error messages are almost impossible to translate, and often they don't make any sense in any other language than English. And even if they do make sense, it's quite common that you want to google that specific error message in order to get a better understanding of what might be wrong.

Searching for an error message in your native language can be quite futile, and I tend to force all important console applications to run in English only.

Using the alias command in combination with the LANG variable, you can force any application to run in English.

Let's say you want the git command from the Git revision control system to run in English only. Here's how you can do that if you are running the Bash shell:

alias git='LANG=en_EN.UTF-8 git'

You need to add that particular line to your .bashrc file.

If you have any comments or corrections feel free to email them to me.