Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OS: Mint13

I have set my preferred language to zh-cn via the language support option.

This has changed the language of a small handful of things (synaptic, dates and times).

However everything else is still in English.

When i set my LANG and MDM_LANG variables to zh-CN.UTF-8 manually in the terminal, and open an application - the correct language is displayed.

However even having placed export LANG="zh-CN.UTF-8" and export LANG="zh-CN.UTF-8" in my .bashrc everything is still in English. (even if run from the terminal which reports the correct LANG etc).


~ $ locale

~ $ cat /etc/environment
share|improve this question
Definitely try .utf8 (lower case no dash). I'm on my phone right now so I can't test, but I remember having to use en_US.utf8 just the other day. – livingstaccato Feb 2 '13 at 20:25
I think you can use .UTF-8 and .utf8 interchangeably, at least here both work, and locale -a only shows .utf8. – njsg Feb 3 '13 at 9:32

I think you're slightly off on the name of your locale. Try export LANG=zh_CN or export LANG=zh_CN.utf8.

To find out list of valid locales look in /usr/share/locales.

share|improve this answer
Thanks, fixed now (via a full restart). btw I think that all the zh locales have caps for UTF - I don't know why. – jsj Feb 2 '13 at 20:31

Try reconfiguring you locales running

sudo dpkg-reconfigure locales

Exporting LANG on .bashrc will only affect applications started from a terminal.

Alternatively you can edit as root the file /etc/default/locale but make sure the locales you need are present, by running locale -a.

share|improve this answer
/etc/default/locale has zh-CN as the first language for all options, as does /etc/environment/ and yet this doesn't filter through to locales. See my edit – jsj Feb 2 '13 at 20:19

Changing locales requires a full restart.

share|improve this answer
Thanks, worked :| – jsj Feb 2 '13 at 20:29
Locales or any other kind of change involving environment variables or groups, if you don't start with those set, changing files won't magically make everything inherit the new values. Also, special care should be taken if you use something like a graphical login manager, as I wonder if that won't simply bypass anything like shell initialization files and just start the X process straight away. – njsg Feb 2 '13 at 20:41
@njsg Yeah I thought that a logout / login would be enough - especially as that did actually change the date and time language – jsj Feb 3 '13 at 1:55
That depends on the distro. On Gentoo, you need to regenerate the /etc/profile (more correctly, files sourced by it), and after you do that, any login shell will get the new locale settings. And you can always source /etc/profile on a running shell. Now for, say, getting the new locale on the X process, you need to start X from an environment with the new locales (here I'd have to terminate X, source /etc/profile and run startx again). You can use locale to inspect what are the locale settings in a specific shell you are using. – njsg Feb 3 '13 at 9:26
(In fact, if you're curious, play with it -- you can, given that you have these locales installed (locale -a to get a list of installed locales), run commands with different locales, for example, in GNU bash LC_TIME=pt_PT.utf8 date gives me the portuguese date format. You can also start programs with different UI languages, if they support these and don't choose to ignore the locale settings (I think libreoffice does this for some measurement and currency settings...): LANG=fi_FI.utf8 libreoffice gives me LibreOffice with a Finnish UI.) – njsg Feb 3 '13 at 9:30

Your Answer


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.