Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to change the language of a particular application that when opened it shows in spanish for example while the rest are in english.

I have spanish and english installed in Ubuntu and am using english as the default one but I would like a way to change the language for a particular application without having to change the whole language of the system.

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

You can change the LANG environment variable in a terminal. After that, all the applications that you launch with the new environment will follow that new locale. For example:

gedit # Will use default locale (English in your case)
export LANG=es_ES
gedit # Will use Spanish (provided it's installed)

If you don't get the Spanish translations for the application, then:

  • Use locale -a | grep es command to verify that Spanish is already available.
  • Try to set LANG to the full string returned by locale -a, that is, es_ES.utf8 instead of just es.
  • Use the locale command to verify the values of your locale environment variables. Depending on your configuration it might happen that LANG is being shadowed by LC_ALL or LANGUAGE environment variables. To fix that, you could set LC_ALL or LANGUAGE directly.

More information about locale environment variables can be found in the Ubuntu documentation and in the gettext manual.

share|improve this answer
add comment

If we're talking about a terminal application, you could set up an alias. I use GB English as my default language but our git repo server only runs on US English. So i added this alias:

alias git="env LC_ALL=\"en_US.UTF-8\" git"

You could add it to your .bashrc or your .aliases list if you use that.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.