local again

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help

local again

Postby zkab on Sun Sep 25, 2011 6:15 am

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
zkab
Level 2
Level 2
 
Posts: 79
Joined: Wed Jun 22, 2011 7:46 pm

Linux Mint is funded by ads and donations.
 

Re: local again

Postby xenopeek on Sun Sep 25, 2011 7:11 am

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15272
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: local again

Postby proxima_centauri on Sun Sep 25, 2011 7:15 am

* Moved to LMDE forum
User avatar
proxima_centauri
Level 11
Level 11
 
Posts: 3976
Joined: Tue Dec 25, 2007 3:24 pm
Location: NB, Canada

Re: local again

Postby zkab on Mon Sep 26, 2011 3:09 am

Vincent Vermeulen 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
Level 2
Level 2
 
Posts: 79
Joined: Wed Jun 22, 2011 7:46 pm

Re: local again

Postby zkab on Fri Sep 30, 2011 5:29 am

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
zkab
Level 2
Level 2
 
Posts: 79
Joined: Wed Jun 22, 2011 7:46 pm


Return to Other Topics

Who is online

Users browsing this forum: No registered users and 1 guest