[Potlatch-dev] i18n update

Tom Hughes tom at compton.nu
Fri Apr 15 19:15:44 BST 2011


On 15/04/11 14:41, Andy Allan wrote:

> * I've been (blindly) following the documentation about naming things
> on their locale (e.g. es_US for spanish speakers who like their dates
> displayed the wrong way round) but I'm not certain if that's the right
> thing to do, since browsers only request languages not locales.

That's not actually quite true - a typical browser will send something like:

   en-GB, en

The issue (which I worked around in the rails code) is that if somebody 
asks for "fr-CA, fr" and we only have "fr_FR" then we would normally 
wind up falling back to english which probably isn't optimal.

In the rails code we generally only use the language code as in most 
cases we don't have multiple locale specific variants of a language. So 
the one we do have then acts as a default.

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/



More information about the Potlatch-dev mailing list