View previous topic :: View next topic |
Author |
Message |
Re-JeeP Apprentice
Joined: 10 Oct 2006 Posts: 294 Location: Sweden
|
Posted: Mon Apr 02, 2007 11:58 am Post subject: [SOLVED] Language problems |
|
|
Hi!
I'm trying to install Gentoo but have some trouble when it comes to languages and encodings.
I want to have my Gentoo in english but my keyboard in swedish. I also wan't to use UTF-8.
I have tried as well as I could but I can't get it to work.
The files I'm trying to edit:
/etc/locale.gen
Code: | Just commented things here... I would like to get explained what this file does! |
/etc/conf.d/keymaps
Code: | KEYMAP="sv-latin1"
SET_WINDOWKEYS="yes"
EXTENDED_KEYMAPS=""
DUMPKEYS_CHARSET="" |
/etc/env.d/02locale
Code: | LC_ALL=sv_SE
LC_TELEPHONE=sv_SE
LANGUAGE=sv_SE
LANG=sv_SE
LC_CTYPE=sv_SE.UTF-8
LC_NUMERIC=sv_SE
LC_TIME=sv_SE
LC_MONETARY=sv_SE
LC_ADDRESS=sv_SE
LC_COLLATE=sv_SE
LC_NAME=sv_SE
LC_PAPER=sv_SE
SYSFONT=lat0-16
LC_MEASUREMENT=sv_SE
LC_IDENTIFICATION=sv_SE |
I can now type and create files with swedish characters. I can also watch the file names with ls.
But if I log in as a regular user and try to ls into /root I get a swedish errormessage (why in swedish?) were the swedish characters are replaced with weird questionmarks (?).
Can somebody please help me?
Thanks! _________________ Dig where you stand!
Last edited by Re-JeeP on Tue Apr 03, 2007 8:19 am; edited 1 time in total |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Mon Apr 02, 2007 12:59 pm Post subject: |
|
|
Here's mine, english (US english) gentoo with swedish keyboard
/etc/env.d/02locale
Code: |
LANG=en_US.utf8
LC_CTYPE=sv_SE.utf8
LC_NUMERIC=sv_SE.utf8
LC_TIME=en_US.utf8
LC_COLLATE=sv_SE.utf8
LC_MONETARY=sv_SE.utf8
LC_MESSAGES=en_US.utf8
LC_ADDRESS=sv_SE.utf8
LC_NAME=sv_SE.utf8
LC_PAPER=sv_SE.utf8
LC_TELEPHONE=sv_SE.utf8
LC_MEASUREMENT=sv_SE.utf8
LC_IDENTIFICATION=sv_SE.utf8 |
_________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
Re-JeeP Apprentice
Joined: 10 Oct 2006 Posts: 294 Location: Sweden
|
Posted: Mon Apr 02, 2007 1:09 pm Post subject: |
|
|
Ehnvis wrote: | Here's mine, english (US english) gentoo with swedish keyboard
/etc/env.d/02locale
Code: |
LANG=en_US.utf8
LC_CTYPE=sv_SE.utf8
LC_NUMERIC=sv_SE.utf8
LC_TIME=en_US.utf8
LC_COLLATE=sv_SE.utf8
LC_MONETARY=sv_SE.utf8
LC_MESSAGES=en_US.utf8
LC_ADDRESS=sv_SE.utf8
LC_NAME=sv_SE.utf8
LC_PAPER=sv_SE.utf8
LC_TELEPHONE=sv_SE.utf8
LC_MEASUREMENT=sv_SE.utf8
LC_IDENTIFICATION=sv_SE.utf8 |
|
Thank you for that! =)
Can you please post your /etc/locale.gen to? And explain what it does if you know? _________________ Dig where you stand! |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Mon Apr 02, 2007 1:30 pm Post subject: |
|
|
my /etc/locale.gen
Code: | en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
sv_SE ISO-8859-15
sv_SE.UTF-8 UTF-8 |
This file contains the locale files that you want, instead of compiling all language files that is available.
In this case I only want en_US, en_GB and sv_SE files no other languages. Saves some space on your
disk and some compilation time. _________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
Re-JeeP Apprentice
Joined: 10 Oct 2006 Posts: 294 Location: Sweden
|
Posted: Mon Apr 02, 2007 1:38 pm Post subject: |
|
|
Ehnvis wrote: | my /etc/locale.gen
Code: | en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
sv_SE ISO-8859-15
sv_SE.UTF-8 UTF-8 |
This file contains the locale files that you want, instead of compiling all language files that is available.
In this case I only want en_US, en_GB and sv_SE files no other languages. Saves some space on your
disk and some compilation time. |
Ok, but what's the differance between this and the LINGUAS flag?
And why use both en_US and en_GB? Big differance? _________________ Dig where you stand! |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Mon Apr 02, 2007 1:48 pm Post subject: |
|
|
I've seen problems if i haven't had both en_US and en_GB in that file, some programs refuses to work.
I've got no idea if there is any difference between my setup and using the LINGUAS flag. _________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
Re-JeeP Apprentice
Joined: 10 Oct 2006 Posts: 294 Location: Sweden
|
Posted: Mon Apr 02, 2007 2:11 pm Post subject: |
|
|
Ehnvis wrote: | I've seen problems if i haven't had both en_US and en_GB in that file, some programs refuses to work.
I've got no idea if there is any difference between my setup and using the LINGUAS flag. |
Ok! Thanks for your help!
Does anyone else know what the differance between the LINGUAS flags and the info in /etc/locale.gen is? _________________ Dig where you stand! |
|
Back to top |
|
|
Re-JeeP Apprentice
Joined: 10 Oct 2006 Posts: 294 Location: Sweden
|
Posted: Tue Apr 03, 2007 7:05 am Post subject: |
|
|
Re-JeeP wrote: | Does anyone else know what the differance between the LINGUAS flags and the info in /etc/locale.gen is? |
I read this at glibc homepage:
glibc wrote: | The empty name says to select a locale based on environment variables. |
So I don't get why even bother do anything with /etc/locale.gen?
Why not specify all that in /etc/env.d/02locale instead?
Anyone? _________________ Dig where you stand! |
|
Back to top |
|
|
Ehnvis Guru
Joined: 13 Jun 2006 Posts: 305 Location: /dev/random
|
Posted: Tue Apr 03, 2007 7:35 am Post subject: |
|
|
Been reading some and I think i understand this a bit more now. The languages you specify in /etc/locale.gen is actually the ones that the system can use (ie it will only compile those languages when you run the command locale-gen). Another way to get the locales you want is to create em manually with localedef. So if you leave /etc/locale.gen empty you might miss the locales that you need/want.
In /etc/env.d/02locale you actually specify which language to use, the locale has to be in /etc/locale.gen or manually created.
LINGUAS flag in /etc/make.conf isn't supported by all programs. _________________ HP NC 4010, Pentium-M 725 1.6GHz w/ 1Gb RAM, 60Gb Hitachi Travelstar.
Running Gentoo-2.6.21-r4 (again as 2.6.22 kernels hogs CPU), all but SD reader works fine. |
|
Back to top |
|
|
Re-JeeP Apprentice
Joined: 10 Oct 2006 Posts: 294 Location: Sweden
|
Posted: Tue Apr 03, 2007 8:18 am Post subject: |
|
|
Thanks for reading in to it! _________________ Dig where you stand! |
|
Back to top |
|
|
|