You are not logged in.

#1 2009-11-05 20:51:36

erketre
Member
From: Poland
Registered: 2007-12-28
Posts: 4

Custom locale (en_PL.UTF-8)

Hello

I have two simple questions:
1. I need polish localization but english language. How can I set correctly en_PL.UTF-8 locale globally? There is no such locale in /etc/locale.gen.
2. What's the difference between "en_US.UTF-8" and "en_US.UTF-8 UTF-8" and "en_US UTF-8" in /etc/locale.gen file?

Last edited by erketre (2009-11-05 21:52:46)

Offline

#2 2009-11-05 21:31:17

eirika
Member
From: New York
Registered: 2009-09-14
Posts: 65

Re: Custom locale (en_PL.UTF-8)

1. It seems that you don't need to deal with locales. After choose an English/Polish locale,
setting some LC family environment variables should solve your problem.
(e.g. LC_COLLATE, LC_MESSAGES, depends on what exactly do you want)

2. en_US.UTF-8 is the name of the locale, in /etc/locale.gen there are two entries:

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

en_US.UTF-8 or en_US are the names of the locale, while UTF-8 or ISO-8859-1 are
the names of the corresponding charsets they use. This information is actually
presented at the beginning of that file.

Last edited by eirika (2009-11-05 21:32:17)

Offline

#3 2009-11-05 21:51:43

erketre
Member
From: Poland
Registered: 2007-12-28
Posts: 4

Re: Custom locale (en_PL.UTF-8)

1. I know, but I don't want to set LC_* vars directly. If locale string in UNIX is <language>_<country>.<charset> so why there can't be en_PL.UTF-8?

2. I still don't get it. So "en_US.UTF-8 UTF-8" and "en_US UTF-8" are the same? How this double "UTF-8" refers to the locale string in UNIX (1)?

Offline

#4 2009-11-05 22:14:05

eirika
Member
From: New York
Registered: 2009-09-14
Posts: 65

Re: Custom locale (en_PL.UTF-8)

1. /usr/share/i18n/locales contains all possible locales. I think your request is not
common enough so they don't put an en_PL there.
2.
en_US.UTF-8 UTF-8
en_US UTF-8

should make no difference in practice, but for me the entry in /etc/locale.gen is
en_US ISO-8859-1, so I took that as an example.

Last edited by eirika (2009-11-05 22:14:56)

Offline

#5 2009-11-06 08:36:06

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: Custom locale (en_PL.UTF-8)

Hi,

I'm not pretty sure I get what you are looking for but here is my configuration:

$ grep locale /etc/rc.conf
LOCALE="en_US.UTF-8"
$ grep ^[^#] /etc/locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1
fr_FR.UTF-8 UTF-8
fr_FR ISO-8859-1
fr_FR@euro ISO-8859-15

That allows me to have EN console messages but full french types. For the DE/WM I just set it up separately (depending on the DE/WM).
Is it the kind of thing you are trying to do?
No answer for your second question big_smile

Last edited by Wikimig (2009-11-06 08:37:49)

Offline

#6 2009-11-06 13:22:27

erketre
Member
From: Poland
Registered: 2007-12-28
Posts: 4

Re: Custom locale (en_PL.UTF-8)

I get your point but I want to know what's wrong with the single, mixed en_PL locale.

Both questions are still open. Maybe some Linux geek will help?

Offline

#7 2009-11-06 13:41:33

blasse
Member
From: Poland
Registered: 2008-04-24
Posts: 303

Re: Custom locale (en_PL.UTF-8)

local.gen is part of glibc. AFAIK glibc uses only ISO, and en_pl isn't defined by ISO. The language/localization schema is used because of en/gb and other languages, that vary depending on localization, not for customization...


Proud ex-maintainer of firefox-pgo

Offline

#8 2009-11-06 15:54:09

erketre
Member
From: Poland
Registered: 2007-12-28
Posts: 4

Re: Custom locale (en_PL.UTF-8)

So the shema is inconsistent in my opinion (why someone who lives in Poland cannot speak english?). After googling a while I find a way to create en_PL locale by modifying /usr/share/i18n/locales/en_EN file.

Second question is still up-to-date...

Offline

#9 2009-11-06 17:18:25

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Custom locale (en_PL.UTF-8)

Personally I would set the locate to pl_PL in rc.conf, and then add a /etc/profile.d/xlocale.sh that exports LC_LANG=en_GB


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB