CodeIgniter Forums
Multi-Language Conventions ? - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter Archived (from EllisLab) (
+--- Forum: Archived Development & Programming (
+--- Thread: Multi-Language Conventions ? (/thread-30953.html)

Multi-Language Conventions ? - El Forum - 06-01-2010

I had bookmarked this

But now I'm not sure if I should use iso 639-2 or -1

And if I use -2, which code should I pick for those languages that have (B) and (T) option?

Is it good to use those codes to name my language folders?

I have been using the english names instead because, as we can see, the codes change, but the names don't.

Any other tips for internationalization are welcome.

Multi-Language Conventions ? - El Forum - 06-01-2010

You'll find all the info you need here.

I use these codes for language folders, instead of the written names like CI uses. This way you can also easily match browser accepted languages with installed languages, as browsers use the same codes.

Multi-Language Conventions ? - El Forum - 06-01-2010

well, I'm getting 'es-AR' from my browser (I'm usign firefox 3.6.3), which is supposed to mean 'espaƱol-Argentina' or 'spanish-Argentine', and according to ISO 639-2/3, it should be 'spa'.

So I don't see how sticking to any code can be useful =s, they change everytime

Multi-Language Conventions ? - El Forum - 06-01-2010

I'm not sure I understand you. 'es-AR' is there to stay, it's not suddenly going to change to 'en-US'.

Using these codes also gives you the advantage to support fallbacks, so if 'es-AR' doesn't exist, you could fallback to 'es'.

Multi-Language Conventions ? - El Forum - 06-01-2010

the guide you posted recommends to use iso 639-3, and links to:

if you go to 's' looking for Spanish, you will find this:

There you have:
639-3: spa
639-2: spa
639-1: es

So I understand that they have changed the code from 'es' to 'spa'.

Most of my browsers are sending 'es' now, but maybe in future versions they move to 'spa' ?

I don't see what's the point of this convention anyway, it's not like users had to deal with these codes.. They should have used integer identifiers instead =P

Multi-Language Conventions ? - El Forum - 06-01-2010

Afaik ISO 639-2/3 doesn't address the "sublanguage" issue, in your case 'es' is different from 'es-AR', like 'en' is not 'en-US' and certainly not 'en-GB'.
There is an aer (Argentine Sign Language), but that's not going to help you. Wink

This coding is considered "best current practice", and defined by rfc5646 (which uses all 639 standards in different places of the language tag).

And I don't know about you, but I know directly what 'es-AR' means, but haven't got a clue which language would be behind "8519".