I read the local in Android . To do this, we need to create a folder of different values for each language.
eg.
Now I want to give support to the Danish language, what should I call the values folder?
For Danes you need to use the da-values folder.
. , , -da.
, Android Locale:
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.
res/values-da/strings.xml.
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-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 .
Through http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes you will use res / values-da / strings.xml.
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.
da
values-da
The same rule applies to all languages.
Link: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Source: https://habr.com/ru/post/1542159/More articles:WIX: How to determine if a third-party application is installed without using a registry search? - installerTeamCity: how to get the latest build metadata for each build type using the REST API - teamcityiOS Facebook sdk 3.14 - can no longer get friends list? - iosMahapps slows down WPF application - c #Facebook Graph API for friends list returns nil on iOS - iosgenerate a random parameter value for a method without knowing the type of the parameter - c #Maven: org.osgi.framework.BundleException: undefined package restriction - javaquickjson extraction key and value - c ++Parallel processing in Linq and foreach - multithreadingDecimal vs. int when using ORM - c #All Articles