[web-devel] [yesod] Messages / i18n question: how to handle "xx-xx" languages

Michael Snoyman michael at snoyman.com
Wed Jul 6 22:08:58 CEST 2011


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"?

Michael

On Wed, Jun 29, 2011 at 7:55 PM, Markus Barenhoff <mb at niulabs.com> wrote:
> Hi!
> I'am using  mkMessage to create the i18n stuff for a project.
> I've created a en.msg and a de.msg and everything is running smoothly
> and I can use the message consts in my hamlet template with _{}.
>
> But I'am a little bit unsure whats the best practise to handle the
> language parameters like 'de-de' or 'en-us'.
> The Message framework does not seem to handle those cases by using
> en.msg for en-us if en-us.msg is not found.
> But copying the message files  also seems not a good option.
> Putting a "take 2" version of the language to the _LANG cookie var
> works, but needs a reload to become active...
>
> Any suggestions / best practice advices?
>
> Regards
> Markus
>
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
>



More information about the web-devel mailing list