LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices



Reply
 
Search this Thread
Old 04-26-2006, 06:56 AM   #1
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Rep: Reputation: 0
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!
 
Old 04-26-2006, 07:13 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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.

Last edited by Simon Bridge; 04-26-2006 at 07:16 AM.
 
Old 04-26-2006, 11:22 PM   #3
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Original Poster
Rep: Reputation: 0
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?
 
Old 04-27-2006, 01:40 AM   #4
stinky_tofu
LQ Newbie
 
Registered: Dec 2005
Posts: 9

Original Poster
Rep: Reputation: 0
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.
 
Old 04-27-2006, 01:54 AM   #5
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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.
 
Old 07-17-2006, 02:25 AM   #6
cppansi
LQ Newbie
 
Registered: May 2006
Distribution: debian,slackware,Knoppix
Posts: 8

Rep: Reputation: 0
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(
 
Old 09-21-2006, 09:08 AM   #7
arieo
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
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
 
Old 09-28-2006, 12:00 AM   #8
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
export: usage: export [-nf] [name[=value] ...] or export -p
 
Old 12-30-2008, 02:55 PM   #9
daniel-linuxquestions
LQ Newbie
 
Registered: Dec 2008
Posts: 1

Rep: Reputation: Disabled
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
 
  


Reply

Tags
command, language, line, linux, redhat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
changing the default language for a terminal paranoid times Linux - Software 3 04-03-2006 04:25 AM
Changing the default language... njschroe Suse/Novell 5 04-24-2005 02:44 PM
Changing Wallpaper from Command Line b_suny Linux - General 2 06-27-2004 06:52 AM
Changing my keyboard layout (language) globally by command (shell) Santorres Linux - Newbie 1 05-17-2004 03:04 PM
Changing default locale/GNOME language elluva Linux - Software 5 01-13-2004 03:20 PM


All times are GMT -5. The time now is 08:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration