[development] Max size of $language->language property

Dave Reid dave at davereid.net
Wed Dec 9 06:41:21 UTC 2009


Scott,

I'm not sure about your approach, but as far as length of language codes,
core uses a VARCHAR(12) field for language codes. The longest code currently
on localize.drupal.org is 'xx-lolspeak'.

Dave Reid
dave at davereid.net


On Wed, Dec 9, 2009 at 12:29 AM, Scott Reynolds <sdrreynolds at gmail.com>wrote:

> So for Activity module we provided multilingual messages not by using t()
> or tt() but by simply providing a messages per enabled language and for the
> language column we use $language->language which is 'en', 'en-us'. See this
> issue: http://drupal.org/node/634006
>
> It appears that is done wrong though, http://drupal.org/node/651174, as
> this user claims that $language->language = "zh-hans".
>
> So what is the right way to handle $language in database tables? What part
> of the $language object to you use as the field and how large should the
> column be? And where does it belong on this handbook:
> http://drupal.org/contributors-guide
>
> --
> Scott Reynolds
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20091209/ba903b07/attachment.html 


More information about the development mailing list