Question on locale specification for ModulePrefs - Locale

31 views
Skip to first unread message

Dennis Ju

unread,
Oct 29, 2012, 7:35:39 PM10/29/12
to opensocial-an...@googlegroups.com
Hello,

In the "ModulePrefs/Locale" section of the Gadget XML reference (link), the following is stated:

***BEGIN***
The valid values for language are ISO639-1 two-digit language codes, and for country they are ISO 3166-1 alpha-2 codes.

There are a few exceptions to the usual language rules:

Simplified Chinese: lang="zh-cn" (typically for country="cn").
Traditional Chinese: lang="zh-tw" (typically for country="tw" or "hk", Taiwan or Hong Kong, respectively)
***END***

Are the only exceptions to the ISO639-1 standard for Chinese (zh-cn and zh-tw)? What about other common variants like pt-BR/pt-PT, en-GB/en-US, etc? What's the expected behavior if the gadget only specifies the two letter code like "zh" for Chinese? 

Thanks,
Dennis


Matthew Marum

unread,
Oct 31, 2012, 2:32:41 PM10/31/12
to opensocial-an...@googlegroups.com
For OpenSocial gadgets, the handling of the Locale section of a gadget xml is defined here... 


From the spec perspective, it's valid to specify only a language.  It would apply to all country codes for that language.

Matt Marum
Reply all
Reply to author
Forward
0 new messages