[Sugar-devel] Some initial thoughts on i18n for Karma

Sean DALY sdaly.be at gmail.com
Tue Jun 23 20:45:57 EDT 2009


I've dealt with this problem sometimes

RFC 4646 is of interest: http://www.ietf.org/rfc/rfc4646.txt

Generally speaking, country codes ISO-3166
(http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm)
and language codes ISO-639
(http://www.loc.gov/standards/iso639-2/php/code_list.php and
http://wiki.laptop.org/go/ISO_639), used together with 2-letter
variants, are sufficient, e.g. :

en-US American English
en-GB British English
es-ES Spanish
fr-BE Belgian French (i.e. "nonante")
fr-FR French (i.e. "quatre-vingt-dix")
nl-BE Flemish
nl-NL Dutch
pt-PT Portugese
pt-BR Brazilian Portugese

but,
zh-CN Chinese

How to distinguish between simplified and traditional Chinese?

that's when you go the full monty and bring in the scripts code,
ISO-15924 (http://www.unicode.org/iso15924/iso15924-codes.html), for
example:

zh-Hans-CN
zh-Hant-CN

alternatively ISO-639-3 instead of 639-1

cmn-CN Mandarin
yue-CN Yue (Cantonese)

All of these codes have standardized placeholders for unknown values.

zh-Zyyy-CN
Chinese, unknown script

hope this helps

Sean


2009/6/23 Bryan Berry <bryan at olenepal.org>:
> On Tue, 2009-06-23 at 09:31 -0500, Felipe López Toledo wrote:
>> >There is a somewhat undocumented algorithm to figure out fallback
>> >locale (eg: if locale is ne_NP, look inside ne_NP, if not found, look
>> >inside ne, and so on)
>> I really like this idea.
>>
>> >so how about naming convention for the audio files
>> >langCode_htmlElementId.ogg   ?
>> you mean something like:
>>
>> en_content.ogg//suppose content is <div id="content" ...>
>> en_answer.ogg //suppose answer is <div id="answer" ...>
>> ?
>
> exactly
> --
> Bryan W. Berry
> Technology Director
> OLE Nepal, http://www.olenepal.org
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>


More information about the Sugar-devel mailing list