local again

Archived topics about LMDE 1 and LMDE 2
Locked
zkab

local again

Post by zkab »

I have Linux Mint Debian 201109 Gnome installed (64 bits) and have some problem with getting the locales in place.
Want to have the language 'english' but all the other formats in 'swedish'.
I generated the swedish locales:

Generating locales (this might take a while)...
en_US.UTF-8... done
sv_SE.UTF-8... done
Generation complete.

The command 'locale' gave:

$ locale
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

I issued commands:

LANG=en_US.UTF-8
export LANG
LC_ALL=sv_SE.UTF-8
export LC_All

and put:

LANG=en_US.UTF-8
LC_ALL=sv_SE.UTF-8

in both /etc/default/locale and /etc/environment.

Then 'locale' looked OK to me ...

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=sv_SE.UTF-8

bu when log out/ log in I was back at square one again:

locale
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

and the language was swedish not english.
Where have I missed ... have read documentation about locales ... but can't figure out the solution
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: local again

Post by xenopeek »

I'm thinking, redo:

Code: Select all

sudo dpkg-reconfigure locales
And make sure you select en_US.UTF-8 as the default locale at the end. That the "C" locale is set on your machine, means you didn't select the en_US.UTF-8 at the end as default locale.

After checking that, you only need to edit /etc/default/locale. And most locale settings you are setting are either not used, or you shouldn't change from the default to avoid breaking programs (like the collate). I'd only put the following in /etc/default/local (this is how I setup on my machine):

Code: Select all

LANG=en_US.UTF-8
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
And note that OpenOffice / LibreOffice is built to integrate as worse as possible with Linux, and is ignoring all locale settings. Manually set the locale for that if need. On Linux Mint 11 you would first install Swedish language support for it with "sudo apt-get install language-support-writing-sv", but this package is not available on LMDE (not sure if needed). From within Writer go to Tools -> Language Settings -> Languages dialog change Locale setting to Swedish, and Western to Swedish.
Last edited by xenopeek on Sun Sep 25, 2011 7:17 am, edited 1 time in total.
Image
proxima_centauri

Re: local again

Post by proxima_centauri »

* Moved to LMDE forum
zkab

Re: local again

Post by zkab »

xenopeek wrote:I'm thinking, redo:

Code: Select all

sudo dpkg-reconfigure locales
And make sure you select en_US.UTF-8 as the default locale at the end. That the "C" locale is set on your machine, means you didn't select the en_US.UTF-8 at the end as default locale.

After checking that, you only need to edit /etc/default/locale. And most locale settings you are setting are either not used, or you shouldn't change from the default to avoid breaking programs (like the collate). I'd only put the following in /etc/default/local (this is how I setup on my machine):

Code: Select all

LANG=en_US.UTF-8
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"

Thanks - now it works ...
zkab

Re: local again

Post by zkab »

There is though a small promlem with Thunderbird.
When I receive a mail that has charset="UTF-8" then my swedish characters looks funny.
View source tells me for that mail:

Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

In Thunderbird I have 'View/Message Body As/Original HTML' and my locales look as follows:

$ locale
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC=sv_SE.UTF-8
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY=sv_SE.UTF-8
LC_MESSAGES="en_US.utf8"
LC_PAPER=sv_SE.UTF-8
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT=sv_SE.UTF-8
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=

I have search for a solution but to no avail ... thankful for any help
Locked

Return to “LMDE Archive”