What is the country code for Estonia on android phone - android

What is the country code for Estonia on an Android phone ?
For example French (France) is fr_FR
and Danish (Denmark) is da_DK
I opened a thread on Google Support but but nobody has replied yet.
Google Support: What is the country code for estonia on Android?

Citing Providing Resources from the dev guide:
The language is defined by a two-letter ISO 639-1 language code, optionally followed by a two letter ISO 3166-1-alpha-2 region code (preceded by lowercase "r").
http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm
ESTONIA EE
http://www.loc.gov/standards/iso639-2/php/code_list.php
Estonian et

I would go with et_EE but I'm not 100% sure.

http://developer.android.com/reference/java/util/Locale.html
There is not a predefined constant for Estonia
however
Being that they are based off the ISO standards XX__XX lowercase xx for language and upercase XX for country,
which come from the ISO lists:
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
and
http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
respectively
it would be something like et_EE for Estonian in Estonia

Related

Support for Welsh language in IntelliJ IDEA for an Android app

From a question received privately:
I'm currently creating an Android app and one of the requirements is that it supports a second language. I've Googled the language codes but I'm not finding the one that I need; could you tell me if you support the Welsh language, which is a place in the United Kingdom? And if so, what is the country code for it?
That would be on Android’s side, not on the IDE side, to support; the resources are bundled within the APK itself and you should put localised strings in a localised values folder within the res/ folder. For example:
res/
values/ # Default locale (e.g., American English)
values-en-rGB/ # British English
values-it/ # Italian (any country)
In general, localisations on Android are defined as a two-letter ISO 639-1 language code, optionally followed by a two letter ISO 3166-1-alpha-2 region code (preceded by lowercase r). Wales is not an independent country, but is part of Great Britain, and as such there is no ISO code for Wales as a region. But, there is a Welsh language code! So you should be able to localise your app by putting your Welsh strings in the res/values-cy or res/values-cy-rGB. The former will be used on all devices that are set to Cymraeg, regardless of the country they’re set to; the latter is specific to devices in Welsh with the country set to Great Britain. For Welsh, the two things are essentially the same, since there aren’t variations of it outside the UK, but this mechanism can be used for example to differentiate Traditional Chinese (zh-rTW) from simplified Chinese (zh-rCN).
For more details on how localisation works on Android, I recommend referring to the Localisation guide on the Android Developers website: https://developer.android.com/guide/topics/resources/localization
For the list of supported ISO languages and countries, you can refer to the Wikipedia: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for the countries, and https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for the languages.

What does the android resource qualifier -b stand for? [duplicate]

By default, Android has always displayed Serbian in Cyrillic, but since 7.0, users can choose between Cyrillic and Latin script. Apps (mostly from Google) ususally puts the Cyrillic strings in sr and the Latin strings in b+sr+Latn. However, b+sr+Latn is very different from the usual convention of using dashes (e.g. sr-rRS-port).
What does b stand for? What is the syntax, and what more can I specify with this?
It's a BCP 47 language tag. It's starts with b and followed by a language, script, region and variant.
BCP 47 documentation
b+sr+Latn would be Serbian with the Latin script.
b+sr+Latn+RS would be Serbian in Serbia, with the Latin script.
The same can be applied to Azerbaijani:
b+az+Latn – Latin script
b+az+Cyrl – Cyrillic script
b+az+Arab – Arabic script
But you can virtually do any combination possible:
b+ja+Hrkt – Japanese with only Hiragana and Katakana
b+ru+Latn – Russian with the Latin script
b+hu+Hung – Hungarian with the Hungarian Runic script
b+en+Cyrl+US – American English with the Cyrillic script
b+hy+Piqd+DE – German Armenian with the Klingon script
(but support will be very limited)
See also:
ISO 639-3 language list
ISO 15924 script list
ISO 3166-1 alpha-2 country list
The "b+" prefix was supported starting in Android 7.0. Prefixing "b+" to a language tag list tells Android that the remaining tags are BCP 47 language tags.
Other answers correctly mention this document, which defines those tags: https://tools.ietf.org/html/bcp47
However, the use of "b+" is not found in that document. The specific meaning behind "b+" is clarified in the Android docs:
To use a BCP 47 language tag, concatenate b+ and a two-letter ISO
639-1 language code, optionally followed by additional subtags
separated by +.
source: https://developer.android.com/guide/topics/resources/providing-resources
Other reference in code:
A BCP 47 language tag. The BCP-47 tag uses + instead of - as
separators, and has the prefix b+. Therefore, the BCP-47 tag
"zh-Hans-CN" would be written as "b+zh+Hans+CN" instead.
source:
https://android.googlesource.com/platform/tools/base/+/master/sdk-common/src/main/java/com/android/ide/common/resources/configuration/LocaleQualifier.java

What does b stand for, and what is the syntax behind b+sr+Latn?

By default, Android has always displayed Serbian in Cyrillic, but since 7.0, users can choose between Cyrillic and Latin script. Apps (mostly from Google) ususally puts the Cyrillic strings in sr and the Latin strings in b+sr+Latn. However, b+sr+Latn is very different from the usual convention of using dashes (e.g. sr-rRS-port).
What does b stand for? What is the syntax, and what more can I specify with this?
It's a BCP 47 language tag. It's starts with b and followed by a language, script, region and variant.
BCP 47 documentation
b+sr+Latn would be Serbian with the Latin script.
b+sr+Latn+RS would be Serbian in Serbia, with the Latin script.
The same can be applied to Azerbaijani:
b+az+Latn – Latin script
b+az+Cyrl – Cyrillic script
b+az+Arab – Arabic script
But you can virtually do any combination possible:
b+ja+Hrkt – Japanese with only Hiragana and Katakana
b+ru+Latn – Russian with the Latin script
b+hu+Hung – Hungarian with the Hungarian Runic script
b+en+Cyrl+US – American English with the Cyrillic script
b+hy+Piqd+DE – German Armenian with the Klingon script
(but support will be very limited)
See also:
ISO 639-3 language list
ISO 15924 script list
ISO 3166-1 alpha-2 country list
The "b+" prefix was supported starting in Android 7.0. Prefixing "b+" to a language tag list tells Android that the remaining tags are BCP 47 language tags.
Other answers correctly mention this document, which defines those tags: https://tools.ietf.org/html/bcp47
However, the use of "b+" is not found in that document. The specific meaning behind "b+" is clarified in the Android docs:
To use a BCP 47 language tag, concatenate b+ and a two-letter ISO
639-1 language code, optionally followed by additional subtags
separated by +.
source: https://developer.android.com/guide/topics/resources/providing-resources
Other reference in code:
A BCP 47 language tag. The BCP-47 tag uses + instead of - as
separators, and has the prefix b+. Therefore, the BCP-47 tag
"zh-Hans-CN" would be written as "b+zh+Hans+CN" instead.
source:
https://android.googlesource.com/platform/tools/base/+/master/sdk-common/src/main/java/com/android/ide/common/resources/configuration/LocaleQualifier.java

Android: how to provide Italian translation?

In the below link the documentation mentions creating "res/values-fr/strings.xml" for French translations and "res/values-ja/strings.xml" for Japanese translations. However, I couldn't find a list of all the acceptable path formats for all languages. I assume Italian would be "res/values-it/strings.xml", but it would be great if someone knew where this is documented.
http://developer.android.com/guide/topics/resources/localization.html
I assume Italian would be "res/values-it/strings.xml"
Yes, it is. The resource system uses the ISO3166-1 two letter country codes. See TelephonyManager.
Taken from Android docs:
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.

Localization Android

What languages are supported by android for localization with their respective values folder name, the best link i could find was http://developer.android.com/reference/java/util/Locale.html
any body can help me with more languages what if we need to support more languages then listed above.
My app uses the following undocumented languages, and they work:
ca Catalan
el Greek
es Spanish
pl Polish
pt Portuguese
ro Romanian
ru Russian
sv Swedish
More generally, it should be the string in the "639-1" column of this table.
I suggest use the list of the ISO 639-1 standard
Virtually any language defined by the Strings representing the language code (as specified by ISO 639-1) and (optionally) country (as defined by Alpha 2 representation of ISO 3166-1). You can specify only the language (i.e. "en") or the language used specifically in one area (i.e. "en","US"). You do not need to use the constants (though convenient) that come with Locale.
// This is to get spanish locale of Spain
Locale spanish = new Locale("es", "ES");
The problem is not only specifying the correct languages, but also assuring that the mobile phone supports literals/formatting for the indicated Locale. I.e. a mobile phone sold in Spain will support "es" and "es_ES", almost surely "en" and "en_US" too and probably "ca_ES", "ba_ES" and "gl_ES". It is not likely that it will support for example "es_AR" or "zh_CN". So I think that the answer to your question is "it depends on the market of your application".

Categories

Resources