Re: language / locale relationship
| From: | Carl W. Brown | Date: | Wed, 07 Jun 2000 03:18:29 +0000 |
| Subject: | Re: language / locale relationship | ||
| References: | 1 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-15@lists.php.net to get a copy of this message | ||
Greg,
Locale is actually a three part construct. ll_cc_vvvvvvv ll is the
language cc is the country and vvvvvvv is the optional variant. For
example en is English but the language is not the entire part of the locale.
People get confused because the language has country variants so the en_US
is both a variant of English and a locale.
This works well for parameters.
en.res contains the common English parameters then the en_US.res contains
the US American English parameters and the US country parameters.
An example of a variant implementation is fr_FR contains the normal France
parameters and fr_FR_EURO contains the parameters that need to be changed to
switch to Euro. There are no standards for variants. They are designed for
interim use or special purposes.
There is also some controversy because locale should also include timezone.
Forget about using the UNIX setlocale for any serious i18n work. It it much
too limited.
Carl
"greg keraunen" <gkeraunen@valinux.com> wrote in message
news:393C18F1.E6FDA114@valinux.com...
> Dear friends,
>
> I'm helping james byers here at valinux with our php i18n efforts and am
> just coming up to speed on some terminology, etc. and was hoping someone
> might be able to shed a bit of light on a few questions.
>
> rfc 1766 specifies the general format for IANA language tags used for
> specifying language.
> In most cases browsers will send language tag values in Accept-Language
> header as a list of:
> [ISO 639 language code]-[ISO 3166 'Code2' Country Code]
> or, in the simplest case:
> [ISO 639 language code]
>
> Question 1:
> I did not see any mention in rfc 1766 of any assumed prioritization or
> 'quality' values for the tags in the Accept-Language list, although, in
> practice, it appears to be assumed that in the absence of any
> ';q=[value]' parameters associated with individual tags, the
> prioritization is from left to right in the list. This seems intuitive
> but i would feel better if I knew how such default quality is assigned
> (by apache?). Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0.14smp i686)
> does not assign any quality parameters to the language tags; do other
> browsers assign quality?
>
> Now, as i understand it, 'locale' is a concept somewhat different from
> 'language' and i assume that, in some cases, there may not be a
> one-to-one correspondence: i.e., different locales may apply for the
> same language, same local may apply to several languages, n'est-ce pas?
>
> I am a bit confused by the fact that locale seems to use symbols similar
> to language tag, but with an underscore instead of a hyphen to separate
> substrings:
>
> LANG=en_US
> LC_CTYPE="en_US"
> LC_NUMERIC="en_US"
> LC_TIME="en_US"
> LC_COLLATE="en_US"
> LC_MONETARY="en_US"
> LC_MESSAGES="en_US"
>
> Question 2:
> Is there any RFC similar to rfc1766 or other standard defining 'locale
> tag' format?
>
> Question 3:
> Since there is no HTTP header for specifying a locale as distinct from
> language, how should one decide upon a locale for displaying content to
> the user? Is there any official spec that maps language tags to locales
> or vice versa?
>
> Thanks for your insights.
> --
> greg keraunen
> gkeraunen@valinux.com
> web software engineer
>
> --
> PHP Internationalization Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-i18n-unsubscribe@lists.php.net
> For additional commands, e-mail: php-i18n-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>