Adding a new locale in Android OS

I need to add a new language in Android OS. I, with my team, translate all the applications provided by the Android OS (for example, Calculator) to make it a language. It is based on an Arabic script and is RTL. I have examined how other applications are translated into Arabic android.googlesource.com

Android OS has already been translated into many languages. I saw this in the source code, where for each application a new strings.xml file is created for the new language,

eg

https://android.googlesource.com/platform/packages/apps/Calculator/+/master/res/values-ur-rPK/

I have a few questions:

  • How can I make sure that this new language appears in the settings → Language and input → Language?

  • Can't a manufacturer show or hide any language?

  • Soon the text was written in English, Farsi was soon written as fa. Similarly, the language I want to add is Sindhi and will soon be written as sd. Will Android know if I create a folder, like values-sd, in the res folder?

  • Sindhi is a language spoken in India and Pakistan. Urdu is also one language spoken in both countries. However, the folder for Urdu was named as vaues-ur-rPK. I know that PC means Pakistan, but I do not know what “r” means in rPK. Are there naming conventions? Is this correct in left languages? The Farsi folder was not named that way?

If there is anything else I should know about, kindly let me know. I read a lot at https://source.android.com and got answers to some basic questions. I am confused about the above issues.

. google . , . .

+4

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


All Articles