What is the folder name "values" for Danish?

I read the local in Android . To do this, we need to create a folder of different values ​​for each language.

eg.

  • res / values ​​/strings.xml: contains English text for all lines that the application uses, including text for a line called title.
  • res / values-fr / strings.xml: Contains French text for all lines, including the title.
  • res / values-ja / strings.xml: contain Japanese text for all lines except the header.

Now I want to give support to the Danish language, what should I call the values ​​folder?

+4
source share
4 answers

For Danes you need to use the da-values ​​folder.

. , , -da.

, Android Locale:

The language codes are two-letter lowercase ISO language codes (such as "en") as defined by ISO 639-1. 
The country codes are two-letter uppercase ISO country codes (such as "US") as defined by ISO 3166-1. 
The variant codes are unspecified. 
+2

res/values-da/strings.xml.

, , , res/values-da-rDK/strings.xml , res/values-da-rGL/strings.xml , res/values-da-rDE/strings.xml ( ), res/values-da-rFO/strings.xml .. - res/values-da-rFR/strings.xml, , - .

, . , res/values-da/strings.xml .

+2

Through http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes you will use res / values-da / strings.xml.

+1
source

The Android values ​​folder corresponds to the locale name specified in ISO-639-1.

Danish, according to the standard, has a locale da, so your folder will be values-da.

The same rule applies to all languages.

Link: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

+1
source

Source: https://habr.com/ru/post/1542159/


All Articles