On 6/24/07, Jeroen Ruigrok van der Werven <[EMAIL PROTECTED]> wrote:
>
> Hi Jonas,
>
> -On [20070624 15:05], Jonas Borgström ([EMAIL PROTECTED]) wrote:
> >I just checked out the i18n branch to add the Swedish translation of
> >Trac. I noticed that trac/locale/ directory already contains a bunch of
> >empty locale directories, all using "long" locale names ("sv_SE" instead
> >of just "sv" for example).
> >
> >Shouldn't we be using the shorter names here?
>
> Not necessarily. It keeps it consistent this way, but the more technical
> answers are below.
>
> >Because as far as I know, browser language negotiation will not select
> >the sv_SE locale for browsers set to "sv". But the other way around will
> >work.
>
> My contacts at Opera said that using sv will mean you accept sv_* and it is up
> to the application or webserver to serve you the sv you think makes most sense
> (which would in the majority of cases be sv_SE).
>
> >(And "sv_SE" isn't even available as an option with Firefox)
>
> sv_SE *is* available as an option for Microsoft Internet Explorer 7. It also
> supports sv_FI. So which is right? Firefox? Opera? Internet Explorer? As far
> as I have been able to determine this is a bit of a shady area of webbrowsers
> and servers. The best way forward, in my opinion, is to keep the current
> language_TERRITORY scheme and provide an internal mapping table in Babel to
> map short-hand Accept-Language specifiers to the appropriate dominant locale,
> a bit like Horde currently does.
>
> If you are aware of any documentation or specification that's very explicit
> about these issues, please feel free to point it out. But I think the above
> makes quite a lot of sentence and should address all points. Can you agree?

The HTTP/1.1 spec is very explicit in section 3.10
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.10):

""" The syntax and registry of HTTP language tags is the same as that
defined by RFC 1766 [1]. In summary, a language tag is composed of 1
or more parts: A primary language tag and a possibly empty series of
subtags:

        language-tag  = primary-tag *( "-" subtag )
        primary-tag   = 1*8ALPHA
        subtag        = 1*8ALPHA

White space is not allowed within the tag and all tags are case-
insensitive. The name space of language tags is administered by the
IANA. Example tags include:

       en, en-US, en-cockney, i-cherokee, x-pig-latin

where any two-letter primary-tag is an ISO-639 language abbreviation
and any two-letter initial subtag is an ISO-3166 country code. (The
last three tags above are not registered tags; all but the last are
examples of tags which could be registered in future.)"""

HTH,

Erik.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to