php-i18n Digest 17 Aug 2002 08:37:31 -0000 Issue 118
Topics (messages 308 through 311):
Country codes
308 by: a.h.s. boy
309 by: Carl W. Brown
310 by: a.h.s. boy
ttest
311 by: lallous
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
A quick question about country codes for settings locales...
Linux seems to require 5-character country codes, language + _ + region,
e.g. "en_US", "fr_CA", etc. for "setlocale". Other Unices (OpenBSD, etc)
seem content with the 2-character codes for language, e.g. "en", "fr".
Can someone explain to me the logic behind the difference, and is there
any way to get Linux to accept the simpler 2-character codes? I know
there's a /usr/share/locale/locale.alias file that accepts aliases,
which could allow me to wrangle 2-character codes (maybe), but I'd
prefer not to mess with too many system files on other people's machines
just to install my software app...
And while we're at it, can anyone explain/confirm the difference between
the
/usr/share/locale/xyz (sometimes 2-character, sometimes 5)
-- appears to contain manual or interface translations?
and
/etc/locale/xyz (2-character)
-- appears to contain initscripts translations?
and
/usr/share/i18n/locales/ (5-character)
-- locale definition files?
and
/usr/lib/locale/ (5-character, seems to be the "system" locale?)
Cheers,
spud.
-------------------------------------------------------------------
a.h.s. boy
spud(at)nothingness.org "as yes is to if,love is to yes"
http://www.nothingness.org/
-------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
Spud,
The problem is that language and regional locale settings are different.
Besides language you have other locale settings such a date format, what
symbol to use as a decimal separator etc.
If you specify "fr" are you just overriding the language ("fr_US") or both
the language and country ("fr_FR")?
If you assume that "fr" is "fr_FR" then do you assume that "en" is "en_GB"?
Carl
> -----Original Message-----
> From: a.h.s. boy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 02, 2002 9:46 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-I18N] Country codes
>
>
> A quick question about country codes for settings locales...
>
> Linux seems to require 5-character country codes, language + _ + region,
> e.g. "en_US", "fr_CA", etc. for "setlocale". Other Unices (OpenBSD, etc)
> seem content with the 2-character codes for language, e.g. "en", "fr".
>
> Can someone explain to me the logic behind the difference, and is there
> any way to get Linux to accept the simpler 2-character codes? I know
> there's a /usr/share/locale/locale.alias file that accepts aliases,
> which could allow me to wrangle 2-character codes (maybe), but I'd
> prefer not to mess with too many system files on other people's machines
> just to install my software app...
>
> And while we're at it, can anyone explain/confirm the difference between
> the
>
> /usr/share/locale/xyz (sometimes 2-character, sometimes 5)
> -- appears to contain manual or interface translations?
> and
> /etc/locale/xyz (2-character)
> -- appears to contain initscripts translations?
> and
> /usr/share/i18n/locales/ (5-character)
> -- locale definition files?
> and
> /usr/lib/locale/ (5-character, seems to be the "system" locale?)
>
> Cheers,
> spud.
>
> -------------------------------------------------------------------
> a.h.s. boy
> spud(at)nothingness.org "as yes is to if,love is to yes"
> http://www.nothingness.org/
> -------------------------------------------------------------------
>
>
> --
> PHP Internationalization Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Carl --
I understand your point, but I'm basically talking about "supported"
locales under various systems (Linux, OpenBSD/Mac OS X, etc).
Under Linux, if you do
setlocale(LC_ALL, 'fr_FR');
it uses the standard fr_FR locale settings, which are part of the
default install of Linux RedHat 7.2, and it works as expected,
displaying date, currency, etc. in French-from-France format.
However, if you do
setlocale(LC_ALL, 'fr')
with just the language code, it simply fails, since there are no locale
settings on Linux indicated as simply "fr". So this isn't really an
issue related to whether or not I'm changing both the language and
country settings, but which form is supported on a given platform.
Cheers,
spud.
On Sunday, August 4, 2002, at 10:53 AM, Carl W. Brown wrote:
> Spud,
>
> The problem is that language and regional locale settings are different.
>
> Besides language you have other locale settings such a date format, what
> symbol to use as a decimal separator etc.
>
> If you specify "fr" are you just overriding the language ("fr_US") or
> both
> the language and country ("fr_FR")?
>
> If you assume that "fr" is "fr_FR" then do you assume that "en" is
> "en_GB"?
>
> Carl
>
-------------------------------------------------------------------
a.h.s. boy
spud(at)nothingness.org "as yes is to if,love is to yes"
http://www.nothingness.org/
-------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
testss
--- End Message ---