Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HowTo Localization
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
SAngeli
l33t
l33t


Joined: 16 Apr 2004
Posts: 904
Location: Italy

PostPosted: Thu Oct 13, 2005 9:45 am    Post subject: HowTo Localization Reply with quote

Hi,

I was under the impression I understood this part, so far, but I believe perhaps something is missing for proper setting.
Can someone please correct how I implement localization?

1) Activate locales that glibc will generate and install adding to /etc/portage/package.use sys-libs/glibc userlocales
2) Find out what locale you system has # locale -a
3) Display all available charmaps # locale -m
4) I specify languages I intend my system to implement editing /etc/locales.build
5) I then customize global localization environment through /etc/env.d/02locale
6) I verify LINGUAS variables in /etc/make.conf
7) I verify UNICODE USE variable in /etc/make.conf
8 ) I verify UNICODE variable set (UNICODE="yes") in /etc/rc.conf
9) I verify proper console font setting through /etc/conf.d/consolefont
10) Commit changes to the system by running # env-update and # source /etc/profile
11) Then, verify if your locales are correct by running # locale, # locale -a and # date
12) Make changes to your kernel settings under: File systems ---> Native Language Support ---> Default NLS Option and change it to UTF8 and also select <*> NLS UTF8

QUESTION 1: After you make changes, at any point in time is it important to re-compile your toolkit (glibc binutils gcc portage) to make sure it implements corrected localizations?
QUESTION 2:How is the list step by step so far?

Here is, followed my step by step, what I currently have on my amd64
Linux 2.6.12-gentoo-r9 #5 Thu Sep 29 13:16:16 CEST 2005 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux

1) in /etc/portage/package.use I have
Code:
sys-libs/glibc userlocales

2) ~ $ locale -a
Code:
C
en_US
en_US.utf8
it_IT
it_IT@euro
it_IT.utf8
POSIX

3) ~ $ locale -m
Code:
ANSI_X3.110-1983
ANSI_X3.4-1968
ARMSCII-8
ASMO_449
BIG5
BIG5-HKSCS
BS_4730
BS_VIEWDATA
CP10007
CP1125
CP1250
CP1251
CP1252
CP1253
CP1254
CP1255
CP1256
CP1257
CP1258
CP737
CP775
CP949
CSA_Z243.4-1985-1
CSA_Z243.4-1985-2
CSA_Z243.4-1985-GR
CSN_369103
CWI
DEC-MCS
DIN_66003
DS_2089
EBCDIC-AT-DE
EBCDIC-AT-DE-A
EBCDIC-CA-FR
EBCDIC-DK-NO
EBCDIC-DK-NO-A
EBCDIC-ES
EBCDIC-ES-A
EBCDIC-ES-S
EBCDIC-FI-SE
EBCDIC-FI-SE-A
EBCDIC-FR
EBCDIC-IS-FRISS
EBCDIC-IT
EBCDIC-PT
EBCDIC-UK
EBCDIC-US
ECMA-CYRILLIC
ES
ES2
EUC-JISX0213
EUC-JP
EUC-JP-MS
EUC-KR
EUC-TW
GB18030
GB2312
GBK
GB_1988-80
GEORGIAN-ACADEMY
GEORGIAN-PS
GOST_19768-74
GREEK-CCITT
GREEK7
GREEK7-OLD
HP-ROMAN8
IBM037
IBM038
IBM1004
IBM1026
IBM1047
IBM1124
IBM1129
IBM1132
IBM1133
IBM1160
IBM1161
IBM1162
IBM1163
IBM1164
IBM256
IBM273
IBM274
IBM275
IBM277
IBM278
IBM280
IBM281
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424
IBM437
IBM500
IBM850
IBM851
IBM852
IBM855
IBM856
IBM857
IBM860
IBM861
IBM862
IBM863
IBM864
IBM865
IBM866
IBM866NAV
IBM868
IBM869
IBM870
IBM871
IBM874
IBM875
IBM880
IBM891
IBM903
IBM904
IBM905
IBM918
IBM922
IEC_P27-1
INIS
INIS-8
INIS-CYRILLIC
INVARIANT
ISIRI-3342
ISO-8859-1
ISO-8859-10
ISO-8859-11
ISO-8859-13
ISO-8859-14
ISO-8859-15
ISO-8859-16
ISO-8859-2
ISO-8859-3
ISO-8859-4
ISO-8859-5
ISO-8859-6
ISO-8859-7
ISO-8859-8
ISO-8859-9
ISO-IR-197
ISO-IR-209
ISO-IR-90
ISO_10367-BOX
ISO_10646
ISO_2033-1983
ISO_5427
ISO_5427-EXT
ISO_5428
ISO_646.BASIC
ISO_646.IRV
ISO_6937
ISO_6937-2-25
ISO_6937-2-ADD
ISO_8859-1,GL
ISO_8859-SUPP
IT
JIS_C6220-1969-JP
JIS_C6220-1969-RO
JIS_C6229-1984-A
JIS_C6229-1984-B
JIS_C6229-1984-B-ADD
JIS_C6229-1984-HAND
JIS_C6229-1984-HAND-ADD
JIS_C6229-1984-KANA
JIS_X0201
JOHAB
JUS_I.B1.002
JUS_I.B1.003-MAC
JUS_I.B1.003-SERB
KOI-8
KOI8-R
KOI8-T
KOI8-U
KSC5636
LATIN-GREEK
LATIN-GREEK-1
MAC-CYRILLIC
MAC-IS
MAC-SAMI
MAC-UK
MACINTOSH
MSZ_7795.3
NATS-DANO
NATS-DANO-ADD
NATS-SEFI
NATS-SEFI-ADD
NC_NC00-10
NEXTSTEP
NF_Z_62-010
NF_Z_62-010_(1973)
NF_Z_62-010_1973
NS_4551-1
NS_4551-2
PT
PT154
PT2
RK1048
SAMI
SAMI-WS2
SEN_850200_B
SEN_850200_C
SHIFT_JIS
SHIFT_JISX0213
T.101-G2
T.61-7BIT
T.61-8BIT
TCVN5712-1
TIS-620
TSCII
UTF-8
VIDEOTEX-SUPPL
VISCII
WIN-SAMI-2
WINDOWS-31J

4) /etc/locales.build
Code:
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
it_IT.UTF-8/UTF-8
it_IT/ISO-8859-1
it_IT@euro/ISO-8859-15

5) /etc/env.d/02locale
Code:
LC_ALL=""
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="it_IT.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="it_IT.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LANG="en_US.UTF-8"

6-7) /etc/make.conf
Code:
LINGUAS="en"
USE="...many others... unicode ...many others..."

8 ) /etc/rc.conf
Code:
UNICODE="yes"

9) /etc/conf.d/consolefont
Code:
CONSOLEFONT="default8x16"
QUESTION 3:How to discover fonts for Italian language (UTF-8 )?

11) ~ $ locale
Code:
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=it_IT.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=


~ $ locale -a
Code:
C
en_US
en_US.utf8
it_IT
it_IT@euro
it_IT.utf8
POSIX


~ $ date
Code:
Thu Oct 13 11:28:28 CEST 2005


12) In kernel under File systems ---> Native Language Support ---> under --- Base native language support[/code]
[code](utf8) Default NLS Option
<*> Codepage 437 (United States, Canada)
<*> ASCII (United States)
<*> NLS ISO 8859-1 (Latin 1; Western European Languages)
<*> NLS ISO 8859-7 (Modern Greek)
<*> NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)
<*> NLS UTF8

QUESTION 4:Do i have a fully UTF-8 localization implemented correctly? If not, can you please point out corrections?
QUESTION 5:I wish GUI and console to have all in english withthe exception of Italian settings like
LC_NUMERIC= LC_MONETARY= LC_PAPER= LC_MEASUREMENT= all set to Italian UTF-8
If my locale is properly set, howcome when I run wine, I always get this error "Warning: Language '' was not recognized, defaulting to English."? Also reported at wine bug

RESOURCES:
- http://www.gentoo.org/doc/en/utf-8.xml
- http://gentoo-wiki.com/HOWTO_Create_an_UTF-8_enabled_system

I thank you for your patience in going through this thread.

Thank you,
Spiro


Last edited by SAngeli on Sat Oct 15, 2005 12:13 pm; edited 2 times in total
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Fri Oct 14, 2005 11:17 pm    Post subject: Reply with quote

Quote:
QUESTION 1: After you make changes, at any point in time is it important to re-compile your toolkit (glibc binutils gcc portage) to make sure it implements corrected localizations?

Recompile glibc after
Quote:
4) I specify languages I intend my system to implement editing /etc/locales.build

Recompile Openoffice after:
Quote:
6) I verify LINGUAS variables in /etc/make.conf

emerge -N world after:
Quote:
7) I verify UNICODE USE variable in /etc/make.conf
Back to top
View user's profile Send private message
log
Apprentice
Apprentice


Joined: 16 Jun 2003
Posts: 168
Location: Adelaide, Australia

PostPosted: Thu Oct 20, 2005 7:15 am    Post subject: Reply with quote

Sorry if I am adding useless stuff to this howto...

but, I have just started learning French and wanted to add french to my system. Once I have done so, all I need to recompile is glibc?

Thank you! 8)
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Fri Oct 21, 2005 11:14 am    Post subject: Reply with quote

yeah, update locales.build, rebuild glibc should do the job.
Back to top
View user's profile Send private message
qweccc
n00b
n00b


Joined: 18 May 2003
Posts: 4

PostPosted: Tue Sep 12, 2006 12:17 am    Post subject: upgrade glibc how can i get big5 Reply with quote

upgrade glibc

...©Çªü~~½Öª¾¹Dªºªü~
locale-gen
* Generating 8 locales (this might take a while)
* (1/Cool Generating en_US.ISO-8859-1 ... [ ok ]
* (2/Cool Generating en_US.UTF-8 ... [ ok ]
* (3/Cool Generating ja_JP.EUC-JP ... [ ok ]
* (4/Cool Generating ja_JP.UTF-8 ... [ ok ]
* (5/Cool Generating ja_JP.EUC-JP ... [ ok ]
* (6/Cool Generating zh_TW.EUC-TW ... [ ok ]
* (7/Cool Generating zh_TW.UTF-8 ... [ ok ]
* (8/Cool Generating zh_TW.BIG5 ... [ ok ]
* Generation complete

locale -a
C
POSIX
en_US
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.utf8
zh_TW
zh_TW.euctw
zh_TW.utf8

½T¨S¦³¬Ý¨ìzh_TW.BIG5...
why???
Back to top
View user's profile Send private message
marcus_cps
n00b
n00b


Joined: 22 Jan 2006
Posts: 39
Location: Campinas

PostPosted: Mon Oct 23, 2006 4:04 am    Post subject: Problem with locales Reply with quote

Hi

I've read Localization guide and did everything...
But I'm still having problems... Look at my locales command output:

Code:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=pt_BR.UTF-8


Can anyone help-me?

Thanks so much!

So... my config files are:

--> /etc/rc.conf
Code:
UNICODE="yes"


--> /etc/env.d/02locale
Code:
LANG="pt_BR.UTF-8"
LC_ALL="pt_BR.UTF-8"


--> /etc/locale.gen
Code:
pt_BR UTF-8
pt_BR ISO-8859-1
en_US UTF-8
en_US ISO-8859-1



Just to say everithing: I've created my locales this way:
Code:
localedef -c -i en_US -f ISO-8859-1 en_US.ISO-8859-1
localedef -c -i en_US -f UTF-8 en_US.UTF-8
localedef -c -i pt_BR -f ISO-8859-1 pt_BR.ISO-8859-1
localedef -c -i pt_BR -f UTF-8 pt_BR.UTF-8

_________________
Marcus
Back to top
View user's profile Send private message
sebaro
Veteran
Veteran


Joined: 03 Jul 2006
Posts: 1141
Location: Romania

PostPosted: Mon Oct 23, 2006 5:58 am    Post subject: Reply with quote

hi

ur locale.gen
Code:

pt_BR UTF-8
en_US UTF-8
pt_BR ISO-8859-1
en_US ISO-8859-1


try
Code:

pt_BR.UTF-8 UTF-8
en_US.UTF-8 UTF-8
pt_BR ISO-8859-1
en_US ISO-8859-1

then
Code:

locale-gen
Back to top
View user's profile Send private message
jeanfrancis
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1482
Location: Québec, Canada

PostPosted: Mon Oct 23, 2006 6:04 am    Post subject: Reply with quote

Quote:
--> /etc/locale.gen
Code:
pt_BR UTF-8
pt_BR ISO-8859-1
en_US UTF-8
en_US ISO-8859-1



Just to say everithing: I've created my locales this way:
Code:
localedef -c -i en_US -f ISO-8859-1 en_US.ISO-8859-1
localedef -c -i en_US -f UTF-8 en_US.UTF-8
localedef -c -i pt_BR -f ISO-8859-1 pt_BR.ISO-8859-1
localedef -c -i pt_BR -f UTF-8 pt_BR.UTF-8


Hi !

First, I think the /etc/locale.gen should look like (example):
Code:

fr_CA.UTF-8 UTF-8
fr_CA ISO-8859-1
en_CA.UTF-8 UTF-8
en_CA ISO-8859-1


*Notice the .UTF8 that you miss in your file.

Secondly, the locales you listed surely already existed, so you didn't have to execute the localedef command.

http://www.gentoo.org/doc/en/guide-localization.xml wrote:
If you use a locale that isn't available by default, you should use localedef to generate your locale.


I don't think that broke anything.

Did you run
Code:
locale-gen
?
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon Oct 23, 2006 4:19 pm    Post subject: Reply with quote

merged above three posts here.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
jeanfrancis
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1482
Location: Québec, Canada

PostPosted: Mon Oct 23, 2006 4:25 pm    Post subject: Reply with quote

Note:

All what is said in the very first posts is true but two things (just to be sure that nobody get confused ;)):

- userlocales USE flag of glibc no longer exists then not have to be set.
- locale-gen is to be used instead of rebuilding glibc with this flag.

Have a nice day :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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