Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android list of language identifiers for values

Tags:

android

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.

like image 412
Hannelore Avatar asked Mar 28 '11 07:03

Hannelore


People also ask

What is i18n in Android?

Internationalization (i18n) is the engineering effort to make a product — an app in our case — ready for localization, i.e. adaptation to different regions. It includes important simplifications in the source code needed to avoid individual changes when entering foreign markets.

How do I localize a string in Android?

Localizing Strings In order to localize the strings used in your application , make a new folder under res with name of values-local where local would be the replaced with the region. Once that folder is made, copy the strings. xmlfrom default folder to the folder you have created. And change its contents.


2 Answers

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.

like image 130
Heiko Rupp Avatar answered Sep 23 '22 03:09

Heiko Rupp


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

like image 23
Jakob Avatar answered Sep 20 '22 03:09

Jakob