Subject: Re: [weirds] Accept-Language header

From: Joseph Yee <[email-masked]>
Date: Sat, 1 Jun 2013 11:35:51 -0400

On Fri, May 31, 2013 at 5:48 PM, Andy Newton <[email-masked]> wrote:

> On 5/31/13 5:27 PM, "Pieter Vandepitte" <[email-masked]>
> wrote:
>
> >I have a question about
> >http://tools.ietf.org/html/draft-ietf-weirds-using-http-05#section-9.3
> >
> >What's the rationale behind the rule that servers should ignore the
> >Accept-Language header? It would be nice if a client could inform the
> >server about its preferred language in some way, so that e.g. a Terms of
> >Use in a Notice object can be sent back in the most appropriate language
> >(i.e. the language of the requester if available, otherwise english).
> >The accept-language header seems the most appropriate to me in this
> >case...
>
> I don't pretend to know the reason, but our I18N experts tell us that such
> usage is inappropriate. There have been long, long discussions on
> internationalization. But the result was that if you want to present the
> notices in different languages, differentiate them using the 'lang'
> property. I do think it will be rare for a registry to support more than a
> handful of languages.
>
> -andy
>
>
I personally would not say it's inappropriate, but relying on
accept-language only would not achieve your goal, and in some scenarios:
risky.

It may be safe relatively for notice, but the way I read the draft, it
meant for whole.  And given the 'otherwise English' is ignoring user
preference in some manner.

The value of accept-language is not only language, but includes preference
in fairly loose way.

accept-language: es
Which Spanish is user requesting?  Spain Spanish? Chile Spanish? Argentina
Spanish?  Assuming there's difference in vocab between them

accept-language: es; q=1.0, en;q=1.0  (or even just accept-language: es, en)
How should it be interpreted?  The preference weight both language the
same.  Serve only one, which one? Spanish because it's listed first?
English because of server's preference?  Serve both?

accept-language: es; q=0.0, en; q=0.0
(could be user error, agent error, or attack.  And 'now what?' Don't serve
notice?  Ignore and serve what you have only)

Also note, the json response format for lookup is strict, there's no change
of (for example) date format with different accept-language value.  Sure
it's more of (some) user expectation than protocol specification.  But it's
ignoring accept-language.  And imagine how complicate it could get.  The
best way, IMO, is to be as specific as possible to identify what server
pass back.

Best
Joseph

P.S. ${lang} or ${lang}-${country} are the most common one, but it can be
extended with region and dialect.

_______________________________________________
> weirds mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/weirds
>