Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Change system language
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
juantxorena
Apprentice
Apprentice


Joined: 19 Mar 2006
Posts: 197
Location: The Shire

PostPosted: Wed Jan 30, 2013 5:57 pm    Post subject: [SOLVED] Change system language Reply with quote

Hello everybody,

For a number of undisclosed reasons, I want to change the default language of my system from spanish to english (in particular, from es_ES to en_GB). However, I would also like to preserve things like the formatting of date, units, etc. like those in the spanish locale, and I would also like to use UTF-8 and a spanish keyboard. I would also like to keep support of spanish, so I have the "nls" useflag set.

I have followed the localization guide as well as some advices in the forums, but it doesn't seems to work. Here's what I've done:

1.- Change the LANG variable in /etc/env.d/02locale to "en_GB.utf8", leave the rest as "es_ES.UTF-8" (note the capitalization differences, I'm not sure if that's relevant, and/or which one is the correct one). Update the environment after that (and some reboots, I started doing this some days ago). LC_ALL is unset.

2.- Select the correct LANG variable with eselect (I think that this is redundant after the first step, I'm not sure).

3.- Rebuild some packages with the new LINGUAS variable. Now I have: en, en_GB, es, es_ES.

It doesn't work. I had to change manually the default language in KDE and now every KDE-related application is in english as desired, but I didn't set any default language for them to being in spanish. Some other programs like firefox are in spanish. I now I can change the language manually, but it should be in english IMHO. Things like manpages and the output of some console programs are still in spanish.

Clearly I'm doing something wrong or missing some step. Help is appreciated.
_________________
I cannot write English very well. Please, correct any mistake so that I can improve.


Last edited by juantxorena on Tue Feb 12, 2013 5:17 pm; edited 2 times in total
Back to top
View user's profile Send private message
PanzerKanzler
Guru
Guru


Joined: 04 Dec 2005
Posts: 371
Location: Belgravia, London

PostPosted: Wed Jan 30, 2013 6:47 pm    Post subject: Reply with quote

Your 02locale sounds fine (I think both .utf8 and .UTF-8 should work, but I can only vouch for .utf8).
How does your /etc/locale.gen look? It should be something like
Code:
es_ES.UTF-8 UTF-8
en_GB.UTF-8 UTF-8

(and don't forget to run locale-gen).
_________________
If you've got nothing nice to say, you're probably not alone...
Back to top
View user's profile Send private message
juantxorena
Apprentice
Apprentice


Joined: 19 Mar 2006
Posts: 197
Location: The Shire

PostPosted: Wed Jan 30, 2013 9:24 pm    Post subject: Reply with quote

PanzerKanzler wrote:
Your 02locale sounds fine (I think both .utf8 and .UTF-8 should work, but I can only vouch for .utf8).
How does your /etc/locale.gen look? It should be something like
Code:
es_ES.UTF-8 UTF-8
en_GB.UTF-8 UTF-8

(and don't forget to run locale-gen).

/etc/locale.gen is correct, and I ran locale-gen, so it is not that.
_________________
I cannot write English very well. Please, correct any mistake so that I can improve.
Back to top
View user's profile Send private message
PanzerKanzler
Guru
Guru


Joined: 04 Dec 2005
Posts: 371
Location: Belgravia, London

PostPosted: Thu Jan 31, 2013 6:53 pm    Post subject: Reply with quote

What is the output of locale? Has it respected your 02locale file? (It should look identical, except locale prints an empty LC_ALL.) What locales are available (locale -a)?

Your setup sounds very similar to mine (except I use sv_SE instead of es_ES), so at least I can guarantee that it is possible to do what you want. Hopefully we will find the problem :)
_________________
If you've got nothing nice to say, you're probably not alone...
Back to top
View user's profile Send private message
juantxorena
Apprentice
Apprentice


Joined: 19 Mar 2006
Posts: 197
Location: The Shire

PostPosted: Thu Jan 31, 2013 8:20 pm    Post subject: Reply with quote

PanzerKanzler wrote:
What is the output of locale? Has it respected your 02locale file? (It should look identical, except locale prints an empty LC_ALL.) What locales are available (locale -a)?

Your setup sounds very similar to mine (except I use sv_SE instead of es_ES), so at least I can guarantee that it is possible to do what you want. Hopefully we will find the problem :)

locale output:
Code:
LANG=en_GB.UTF-8
LC_CTYPE=es_ES.UTF-8
LC_NUMERIC=es_ES.UTF-8
LC_TIME=es_ES.UTF-8
LC_COLLATE=es_ES.UTF-8
LC_MONETARY=es_ES.UTF-8
LC_MESSAGES=es_ES.UTF-8
LC_PAPER=es_ES.UTF-8
LC_NAME=es_ES.UTF-8
LC_ADDRESS=es_ES.UTF-8
LC_TELEPHONE=es_ES.UTF-8
LC_MEASUREMENT=es_ES.UTF-8
LC_IDENTIFICATION=es_ES.UTF-8
LC_ALL=


locale -a
Code:

C
en_GB
en_GB.iso88591
en_GB.utf8
en_US
en_US.iso88591
en_US.utf8
es_ES
es_ES@euro
es_ES.iso88591
es_ES.iso885915@euro
es_ES.utf8
POSIX
spanish

Maybe I should clean up this one a bit.

There must be some variable somewhere that controls the default language, other than this one, that i can't find.
_________________
I cannot write English very well. Please, correct any mistake so that I can improve.
Back to top
View user's profile Send private message
juantxorena
Apprentice
Apprentice


Joined: 19 Mar 2006
Posts: 197
Location: The Shire

PostPosted: Sun Feb 10, 2013 6:19 pm    Post subject: Reply with quote

After some days, I have tried some new things.

I searched my entire system for "es_ES" in every single file just in case there was some undocumented variable. I didn't find anything but for some archived config files. Nothing in .bashrc, in some locale file, nothing.

I've also tried some variants about the capitalization trouble in UTF-8, and also I've tried setting just the "en" language instead of "en_GB".

I've used LC_ALL="en_GB.utf8", to see if that worked, and it didn't neither.

Nothing.

Any help will be welcome.
_________________
I cannot write English very well. Please, correct any mistake so that I can improve.
Back to top
View user's profile Send private message
juantxorena
Apprentice
Apprentice


Joined: 19 Mar 2006
Posts: 197
Location: The Shire

PostPosted: Mon Feb 11, 2013 9:06 pm    Post subject: Reply with quote

It's done now. All I had to do is to change some more variables in the /etc/env.d/02locale file, now it reads:
Code:
LANG="en_GB.UTF-8"
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"

I'm not sure about the LC_CTYPE one. Maybe it should be left as "C"?

A comment, some programs have the "en_US" linguas variable, but not "en_GB" neither "en". I think that's a bug or something, maybe it should be reported. What do you think, o people?
_________________
I cannot write English very well. Please, correct any mistake so that I can improve.
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