Tuesday, July 29, 2014

How Language ISO and Locale ID works


"A language ID designates a written language (or orthography) and can reflect either the generic language or a specific dialect of that language. To specify a language ID, you use a language designator by itself. To specify a specific dialect of a language, you use a hyphen to combine a language designator with a region designator. Thus, the English language as it is spoken in Great Britain would yield a language ID of en-GB, while the English language spoken in the United States would have a language ID of en-US. To specify the generic version of the English language, you would use the language ID en by itself."


"A locale ID identifies a specific location where a given language is spoken. To specify a locale ID, use an underscore character to combine a language designator with a region designator. The locale ID for English-language speakers in Great Britain is en_GB, while the locale for English-speaking residents of the United States is en_US. Although locale IDs and language IDs might seem nearly identical, there is a subtle difference. A language ID identifies a written and spoken language only. A locale identifies a region and its conventions and has a more cultural context."


"To illustrate the difference between language IDs and locale IDs, consider the following example. The dialect for a resident of Great Britain is specified by the code en-GB. The commonly used locale for that same person is en_GB. If you wanted to be very precise when specifying the locale, you could specify the locale code as en-GB_GB. This specifies a person who speaks the British dialect of English and who resides in Great Britain. If that same person moved to the United States, the appropriate locale would been-GB_US, which would identify a person who speaks British English but uses the regional settings associated with the United States."

See https://developer.apple.com/library/mac/documentation/macosx/conceptual/bpinternational/Articles/LanguageDesignations.html
http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html

No comments:

Post a Comment