Android list of language identifiers for values
I want to implement multilanguage in my app. I've read the following documentation and it was very intresting (Do android support multiple languages?).
I understand how it works, but is there a list of identifiers available?
For example, if I want to implement the language Dutch, is it enough to implement the first two letters of the language (in this case 'ne') or not?
Thank you very much开发者_Go百科.
Actually those are not the first two letters of the language, but the ISO 639-1 language code. E.g. 'de' for German, 'fr' for French and 'nl' for Dutch. See the docs on providing resources for more details.
here are the language codes http://www.loc.gov/standards/iso639-2/php/code_list.php
You want to use the iso 639-1 code
e.g. for Spanish create a values folder named values-es
The previous answers are not correct. Android locales are build on ISO 639-1 but offer more specific codes. For example, Brazil is not listed in ISO 639-1, but Android allows for a values-pt-rBR
folder to target Brazil only.
See https://github.com/championswimmer/android-locales for all available locales
精彩评论