LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Changing default language from command line (https://www.linuxquestions.org/questions/red-hat-31/changing-default-language-from-command-line-438947/)

stinky_tofu 04-26-2006 05:56 AM

Changing default language from command line
 
I installed RedHat 9 Linux about a few months ago, however, I set up the OS to use Chinese as the default language. So now, all system messages in the command line are displayed in Chinese. This is a problem now because I have given other people access to the server. And these people cannot read Chinese.

I'm still a newbie to Linux and only know how to change the default language back to English by using the GUI interface in Gnome. The probem with this is I am accessing the server via SSH and do not have access to X-Window. Anybody have any idea how to change the default language back to English from the command line, without having to use x-window? Just want to save myself a trip to the IDC.

Thanks!

Simon Bridge 04-26-2006 06:13 AM

setlocale en_US.utf-8

hint:
apropos language
--- gets you everything to do with languages. The only one not about programming is "locale" so...

apropos locale
--- gets a list of commands to do with "locale", including "setlocale" which sounds good.

man setlocale tells me how to use it.
man locale tells me to run "locale -a" to get a list of available locales.
Choose one of the English ones.

stinky_tofu 04-26-2006 10:22 PM

Thanks, but when I run setlocale en_US.utf-8, I receive this message:

-bash: setlocale: command not found

Is setlocale available in RedHat 9?

stinky_tofu 04-27-2006 12:40 AM

Thanks for your help, but never mind, I managed to change the language with the following instructions:

Try using these steps to change the FEDORA language setting from a command prompt:

Go to the Fedora system configuration diretory
1. cd /etc/sysconfig

Make backup copy of your language setting file
2. cp i18n i18n.backup

Edit language setting file to allow english as default
3. You can edit the file by using nano or vi text editors available on all Fedora systems from SSH. I prefer nano so:
4. nano i18n
5. 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"

6. 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.

Simon Bridge 04-27-2006 12:54 AM

well - does "man setlocale" produce a man page?
hmmm ... the bash one won't run for me neither.

I guess you could always export en_US.utf-8 to all the environment variables:
Code:

[~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

... and reboot.

cppansi 07-17-2006 01:25 AM

hi
oh ,u know, i post a new thread about change language in a live CD, knoppix base- or i havt to say Debian base- allover i need it can support en-US and an other language, at 1st i trid do it by change/edit XF86Config to change keylayout and added some new fonts-TTF- but its failed,i tried changes by using control center, when i login 'chroot' my new remastered linux it was ok but after burning ,hummm, nothing happend, the fonts can be use by openoffice but the language or in other words the multilanguage supprot was failed, Now, i wish someone can tell me how can do it.
:O(

arieo 09-21-2006 08:08 AM

Quote:

Originally Posted by Simon Bridge
well - does "man setlocale" produce a man page?
hmmm ... the bash one won't run for me neither.

I guess you could always export en_US.utf-8 to all the environment variables:
Code:

[~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

... and reboot.


hello

how i can change "LC_ALL=he_IL" to "LC_ALL=" ???

thanks

Simon Bridge 09-27-2006 11:00 PM

export: usage: export [-nf] [name[=value] ...] or export -p

daniel-linuxquestions 12-30-2008 01:55 PM

the easiest way to change the system language settings in a redhat/fedora/centos environment is using the default config tool in the system:

system-config-language


All times are GMT -5. The time now is 04:46 PM.