how to change locale in trisquel-mini 6.0?

4 risposte [Ultimo contenuto]
nuccigiorgio
Offline
Iscritto: 08/19/2013

Guys, does someone know how to have two different variables in my locale in different languages? I need LC_MONETARY=en_IE.UTF8 and LANG=it_IT.UTF8. I have tried:

sudo su
cat << EOF >> /etc/environment
LANG="it_IT.UTF-8"
LC_CTYPE=en_IE.UTF8
LC_COLLATE=en_IE.UTF8
LC_TIME=en_IE.UTF8
LC_NUMERIC=en_IE.UTF8
LC_MONETARY=en_IE.UTF8
LC_MESSAGES=en_IE.UTF8
LC_PAPER=en_IE.UTF8
LC_NAME=en_IE.UTF8
LC_ADDRESS=en_IE.UTF8
LC_TELEPHONE=en_IE.UTF8
LC_MEASUREMENT=en_IE.UTF8
LC_IDENTIFICATION=en_IE.UTF8
cat << EOF > /etc/default
LANG="it_IT.UTF-8"
LC_CTYPE=en_IE.UTF8
LC_COLLATE=en_IE.UTF8
LC_TIME=en_IE.UTF8
LC_NUMERIC=en_IE.UTF8
LC_MONETARY=en_IE.UTF8
LC_MESSAGES=en_IE.UTF8
LC_PAPER=en_IE.UTF8
LC_NAME=en_IE.UTF8
LC_ADDRESS=en_IE.UTF8
LC_TELEPHONE=en_IE.UTF8
LC_MEASUREMENT=en_IE.UTF8
LC_IDENTIFICATION=en_IE.UTF8

Then I ran

locale-gen --purge
update-locale

But I still get all the variables in it_IT.UTF8

nuccigiorgio
Offline
Iscritto: 08/19/2013

The line which says /etc/default should be /etc/default/locale

When I say I get the same result, I mean that all variables are it_IT.UTF8 when I type locale in the terminal

Oh, I also tried gnome-language-selector (with and without system-wide), but every time I restarted, I got the same result.

BugRep
Offline
Iscritto: 04/05/2012

Use UTF-8 instead of UTF8.

nuccigiorgio
Offline
Iscritto: 08/19/2013

Thanks! I did:

sudo su
sed -i 's#UTF8#UTF-8#g' /etc/environment
sed -i 's#UTF8#UTF-8#g' /etc/default/locale
locale-gen --purge
update-locale
locale

I got a warning (I think that I also missed to post the last line in /etc/default/locale in the first message):
*** update-locale: Warning: LANGUAGE ("it_IT:en_GB:en") is not compatible with LC_MESSAGES (en_IE.UTF-8). Disabling it.

and it works as root, but when I go to my own account and type locale, I keep getting all variables as it_IT.UTF-8.

I know that I had fixed this in my previous installation of Trisquel, but I can't remember how I did it! I am using LXDM, if that is useful information.

nuccigiorgio
Offline
Iscritto: 08/19/2013

I got it. It seems that lxdm loads the default configuration from $HOME/.profile. This file doesn't exist in the default Trisquel-mini install (at least not for me.) So, I created it by copying what I had in /etc/default/locale

cat << EOF > ~/.profile
LANG="it_IT.UTF-8"
LANGUAGE="it_IT.UTF-8"
LC_CTYPE=en_IE.UTF-8
LC_COLLATE=en_IE.UTF-8
LC_TIME=en_IE.UTF-8
LC_NUMERIC=en_IE.UTF-8
LC_MONETARY=en_IE.UTF-8
LC_MESSAGES=en_IE.UTF-8
LC_PAPER=en_IE.UTF-8
LC_NAME=en_IE.UTF-8
LC_ADDRESS=en_IE.UTF-8
LC_TELEPHONE=en_IE.UTF-8
LC_MEASUREMENT=en_IE.UTF-8
LC_IDENTIFICATION=en_IE.UTF-8

Note that if you don't set LANGUAGE, the system will not listen to what you say.

Credits go to:
LXDE.org Forum • View topic - [Solved] LXDM default session and language
forum.lxde.org/viewtopic.php?t=1185&f=4