Scott,<div><br></div><div>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 <a href="http://localize.drupal.org">localize.drupal.org</a> is 'xx-lolspeak'.</div>
<div><br clear="all">Dave Reid<br><a href="mailto:dave@davereid.net">dave@davereid.net</a><br>
<br><br><div class="gmail_quote">On Wed, Dec 9, 2009 at 12:29 AM, Scott Reynolds <span dir="ltr"><<a href="mailto:sdrreynolds@gmail.com">sdrreynolds@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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: <a href="http://drupal.org/node/634006" target="_blank">http://drupal.org/node/634006</a><br>
<br>It appears that is done wrong though, <a href="http://drupal.org/node/651174" target="_blank">http://drupal.org/node/651174</a>, as this user claims that $language->language = "zh-hans". <br><br>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: <a href="http://drupal.org/contributors-guide" target="_blank">http://drupal.org/contributors-guide</a><br clear="all">
<br>-- <br><font color="#888888">Scott Reynolds<br><br>
</font></blockquote></div><br></div>