Page 1 of 1

Language IDs

Posted: 24 Jan 2006 00:44
by minime
wiki wrote:language-id .... Since 2.0.1 alpha 59, this value can have an alternative format that allows distinguishing up to 64 languages. To use this, set bit 6, and set the language ID in bits 0..5.
The question is, what are those IDs?

First of all, is it safe to assume that the values for the 5 original locales will remain same (for compatibility)? i.e.

Code: Select all

0x01	American
0x02	English
0x04	German
0x08	French
0x10	Spanish
I would like to reserve two IDs for Czech and Slovak. Since the current trend seems to be to use country calling codes, i've considered 420 and 421. Unfortunately those are out of range to be valid language IDs, so we have to transform them a little. Let the digits mean the numbers of bits to set high. We get:

Code: Select all

420 -> 0x10 + 0x04 + 0x01 = 0x15 (21 dec)
421 -> 0x10 + 0x04 + 0x02 = 0x16 (22 dec)
Luckily, 21 and 22 aren't international dialing tones, so we can pull this off. Besides it lends to a simple mnemonic.

Therefore the language IDs are so far:
  • Russian - 0x07 - reserved by George on Sat Jan 07, 2006 12:51 am
    Czech - 0x15 - reserved by minime
    Slovak - 0x16 - reserved by minime
    Norwegian - 0x2F - reserved by OzTransLtd on Sat Jan 07, 2006 12:01 am
with the possible inclusion of the default IDs.

Could anyone please help clarify this, since there is no official documentation on this?

Re: Language IDs

Posted: 24 Jan 2006 01:34
by Patchman
minime wrote:The question is, what are those IDs?
Whatever you want them to be.
First of all, is it safe to assume that the values for the 5 original locales will remain same (for compatibility)?
Yes.
Could anyone please help clarify this, since there is no official documentation on this?
Your suggestion sounds good.

In the future, anyone wanting to use a new ID should just self-document it by adding it to the wiki. I've added them myself for now.