Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with locale setting.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Sat Feb 25, 2012 9:13 am    Post subject: Problem with locale setting. Reply with quote

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
View user's profile Send private message
Dont Panic
Guru
Guru


Joined: 20 Jun 2007
Posts: 322
Location: SouthEast U.S.A.

PostPosted: Sat Feb 25, 2012 3:37 pm    Post subject: Reply with quote

You can confirm ru_RU.UTF-8 is an installed locale with
Code:
locale-gen -l

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
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3610

PostPosted: Sat Feb 25, 2012 4:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dont Panic
Guru
Guru


Joined: 20 Jun 2007
Posts: 322
Location: SouthEast U.S.A.

PostPosted: Sat Feb 25, 2012 5:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum