[web-devel] [yesod] Messages / i18n question: how to handle "xx-xx" languages
mb at niulabs.com
Thu Jul 7 00:29:28 CEST 2011
On 6 July 2011 22:08, Michael Snoyman <michael at snoyman.com> wrote:
> I *don't* have a hard and fast answer here, these are my thoughts. I'd
> like to hear what people think about this.
> My advice is to use one or the other: either "en" for all English
> versions, or "en-us" and "en-uk". I think all browsers will send both
> versions in the request headers.
> If you want to have a system where you can choose American or British
> English, and default to American, why not provide "en-uk" and "en"?
I think it would be nice if the "most specific" version availible is choosen.
1.) for every preferred language of the client check in order of preference:
2.) if language has form xx-yy check if xx-yy.msg is availible. if not
check if xx.msg is availible.
3.) if both in 2.) are not availible, check for next prefferred
language. if no more langs are availible use the default language.
More information about the web-devel