View previous topic :: View next topic |
Author |
Message |
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sat Feb 25, 2012 9:13 am Post subject: Problem with locale setting. |
|
|
Hi, ALL,
In order to test some stuff I need to change my locale.
According to this guide I need to change the ~/.bashrc.
Here is the new content:
Code: |
igor@IgorsGentooOnNetwork ~ $ cat ~/.bashrc
export LANG="ru_RU.UTF-8"
export LC_CTYPE="ru_RU.UTF-8"
export LC_NUMERIC="ru_RU.UTF-8"
export LC_TIME="ru_RU.UTF-8"
export LC_COLLATE="ru_RU.UTF-8"
export LC_MONETARY="ru_RU.UTF-8"
export LC_MESSAGES="ru_RU.UTF-8"
export LC_PAPER="ru_RU.UTF-8"
export LC_NAME="ru_RU.UTF-8"
export LC_ADDRESS="ru_RU.UTF-8"
export LC_TELEPHONE="ru_RU.UTF-8"
export LC_MEASUREMENT="ru_RU.UTF-8"
export LC_IDENTIFICATION="ru_RU.UTF-8"
export LC_ALL=
|
I also executed "source ~/.bashrc" command in order for the new locale to take effect.
Then I got out of the X, log out and log back in.
When issuing "locale" command, I still got this:
Code: |
igor@IgorsGentooOnNetwork ~ $ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
|
Am I doing something wrong?
Is this enough:
Code: |
igor@IgorsGentooOnNetwork /usr/share/locale/ru_RU $ ls -la
total 12
drwxr-xr-x 3 root root 4096 Jun 30 2011 .
drwxr-xr-x 192 root root 4096 Jun 30 2011 ..
drwxr-xr-x 2 root root 4096 Jun 30 2011 LC_MESSAGES
|
?
I am planning to remove those lines later on and then do "source ~/.bashrc" again to get rid of this Russian locale. Would that be OK?
Thank you. |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Sat Feb 25, 2012 3:37 pm Post subject: |
|
|
You can confirm ru_RU.UTF-8 is an installed locale with
But you should be able to tell just by the behavior of the bash console if the locale setting is working. Are bash console commands responding with the ru_RU.UTF-8 locale? |
|
Back to top |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3610
|
Posted: Sat Feb 25, 2012 4:23 pm Post subject: |
|
|
Hi,
I had to generate the locale as it was not available. Now it shows up but...
Code: |
igor@IgorsGentooOnNetwork ~ $ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
igor@IgorsGentooOnNetwork ~ $ su
Password:
IgorsGentooOnNetwork igor # locale-gen -l
ru_RU.UTF-8
|
Any other idea?
And what you mean "console should behave accordingly"?
Thank you. |
|
Back to top |
|
|
Dont Panic Guru
Joined: 20 Jun 2007 Posts: 322 Location: SouthEast U.S.A.
|
Posted: Sat Feb 25, 2012 5:41 pm Post subject: |
|
|
ONEEYEMAN wrote: | And what you mean "console should behave accordingly"? |
I'm confused as to why this isn't working for you.
I repeated your experiment on my system.
Last time I did this, it seemed like it localized much more stuff. But if I start Abiword from the console, I get a ru_RU.UTF-8 menu.
So if I start with my normal, non-localized .bashrc, I get this:
Code: | $ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL= |
I generated the appropriate locales with the following in my /etc/locale.gen file:
Code: | en_US ISO-8859-1
en_US.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
de_DE.UTF-8 UTF-8
ru_RU.UTF-8 UTF-8 |
Then I edit my user .bashrc, and add your lines:
Code: | export LANG="ru_RU.UTF-8"
export LC_CTYPE="ru_RU.UTF-8"
export LC_NUMERIC="ru_RU.UTF-8"
export LC_TIME="ru_RU.UTF-8"
export LC_COLLATE="ru_RU.UTF-8"
export LC_MONETARY="ru_RU.UTF-8"
export LC_MESSAGES="ru_RU.UTF-8"
export LC_PAPER="ru_RU.UTF-8"
export LC_NAME="ru_RU.UTF-8"
export LC_ADDRESS="ru_RU.UTF-8"
export LC_TELEPHONE="ru_RU.UTF-8"
export LC_MEASUREMENT="ru_RU.UTF-8"
export LC_IDENTIFICATION="ru_RU.UTF-8"
export LC_ALL= |
Then everything seems OK for me:
Code: | ~ $ source ~/.bashrc
~ $ locale
LANG=ru_RU.UTF-8
LC_CTYPE=ru_RU.UTF-8
LC_NUMERIC=ru_RU.UTF-8
LC_TIME=ru_RU.UTF-8
LC_COLLATE=ru_RU.UTF-8
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES=ru_RU.UTF-8
LC_PAPER=ru_RU.UTF-8
LC_NAME=ru_RU.UTF-8
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT=ru_RU.UTF-8
LC_IDENTIFICATION=ru_RU.UTF-8
LC_ALL= |
|
|
Back to top |
|
|
|