Server Fault is a question and answer site for system and network administrators. 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

So apparently, CentOS decided I was Dutch, and thus, should not have a English locale.

Apart from the fact that this greatly bothers me, I am having a pretty hard time actually changing it back. There does not seem to be a setlocale function, and system-config-language tells me I am using an English locale, even though my environment says otherwise.

Any help would be appreciated.

Output from locale:


Both my ~/.bashrc as ~/.bash_profile contain no locale settings. Additionally, /etc/bashrc does not contain any locale references either.

share|improve this question

I just stumbled on this exact same problem, and found out why this is happens in my case and thought i'd share. I recently got a new iMac at work that runs OS X Lion (previous workstation was OS X Snow Leopard)

OS X Lion by default sets the locale in env variable LANG in Terminal. This was set to nl_NL.UTF-8. Sshd on the CentOS system imports this environment variable in its shell when you ssh into your CentOS box.

I solved it by disabling 'Set locale environment variables on startup' in Terminal preferences (settings->advanced)

Don't know if you run OS X on your desktop, but bottom line is: sshd on CentOS imports the locale settings from the ssh client workstation.


share|improve this answer

If you use SSH, there is another way to achieve the same result, which works in iTerm as well. You must modify the SSH configuration:

sudo vi /etc/ssh_config

Find and comment out the line containing

SendEnv LANG LC_*
share|improve this answer
thank you very much!, very helpful for me – egor7 Feb 8 '13 at 20:20

If system-config-language doesn't help you, try this.

  1. Go to the CentOS system configuration directory

    $ cd /etc/sysconfig
  2. Make backup copy of your language setting file

    $ cp i18n i18n.backup
  3. Edit language setting file to allow English as default. You can edit the file by using nano or vim text editors available on all CentOS systems from SSH. I prefer vim, but nano is more easier:

    $ nano i18n
  4. Edit the file to include these lines as the first three lines of the file:

    $ LANG="en_US.UTF-8"
    $ SYSFONT="latarcyrheb-sun16"
    $ SUPPORTED="en_US.UTF-8:en_US:en"
  5. Save the file and restart system. If you can not restart the system you need to have permission to restart init.d

That should enable the new language setting. If you can not perform these through SSH because the access is too restricted, you will likely need to notify the ISP or whoever has physical access to the server.

Regards and best wishes.

share|improve this answer

At least Fedora 16 defines language in GRUB command line. See /boot/grub/grub.conf and /etc/grub.conf.

Then there's /etc/sysconfig/i18n file which contains language settings.

share|improve this answer

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.