language / locale relationship
| From: | greg keraunen | Date: | Mon, 05 Jun 2000 21:17:37 +0000 |
| Subject: | language / locale relationship | ||
| Groups: | php.i18n | ||
| Request: | Send a blank email to php-i18n+get-12@lists.php.net to get a copy of this message | ||
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