Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "values" folder name for Danish Language?

I read the localization in Android. Here for we need to create different values's folder for each language.

for e.g.

  1. res/values/strings.xml : Contains English text for all the strings that the application uses, including text for a string named title.
  2. res/values-fr/strings.xml : Contain French text for all the strings, including title.
  3. res/values-ja/strings.xml : Contain Japanese text for all the strings except title.

Now I want to give support for Danish language then what should I name to value's folder ?

like image 436
user2060383 Avatar asked Feb 12 '23 21:02

user2060383


2 Answers

For Danish, you got to use values-da folder.

Edit: It turns out, according to this post that it is values-da.

Plus, according to the Android Locale class documentation:

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. 
like image 58
joao2fast4u Avatar answered Feb 15 '23 11:02

joao2fast4u


For Danish generally, you would want to use res/values-da/strings.xml.

To have strings specific to a country as well as a language you would use res/values-da-rDK/strings.xml for Denmark, res/values-da-rGL/strings.xml for Greenland, res/values-da-rDE/strings.xml for Germany (there being a sizable Danish-speaking community in Southern Schleswig along with a few elsewhere in Germany), res/values-da-rFO/strings.xml for the Faroe Islands, and so on. You can even have something like res/values-da-rFR/strings.xml as while there isn't a large Danish-speaking population in France, nothing stops you doing something like that anyway.

You can mix these, e.g. being specific to country only for a handful of values, falling back to res/values-da/strings.xml for everything else.

like image 35
Jon Hanna Avatar answered Feb 15 '23 10:02

Jon Hanna