Adding new locale to Android OS - android

I need to add a new locale to Android OS. I, with my team, will
translate all the apps provided by Android OS (e.g. Calculator) to
that language. It is based on Arabic script and is RTL. I have
reviewed how other apps are translated into Arabic on
android.googlesource.com
Android OS has already been translated into many languages. I saw that in source code where for each app a new strings.xml file is created for a new language,
for example
https://android.googlesource.com/platform/packages/apps/Calculator/+/master/res/values-ur-rPK/
I have few questions:
How would I make sure that this new language appears in Settings ->
Language & Input -> Language?
Is it up to manufacturer to show or hide any language?
English is shortly written as en, Farsi is shortly written as fa.
Similarly, the language I want to add is Sindhi and is shortly written
as sd. Will Android know if I make folder like values-sd in res
folder?
Sindhi is 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 PK means Pakistan, but I don't know what
"r" stands for in rPK. Is there a naming conventions? Is it for right
to left languages? Folder for Farsi was not named this way?
If there is something else I should know about, kindly let me know. I
have read a lot on https://source.android.com and have answers to some
basic questions. I am confused about the above questions.
Note: I had asked my question on android google groups for developers. One group rejected my post from appearing in the group and in other group no one was interested in my questions. Therefore, I am asking here.

Related

How to declare the fallback language on Android for TalkBack?

I have an Android app that currently only has a fallback language, so all strings are in res/values/strings.xml and are in English. This works fine with TalkBack while the OS is also set to English. However, as soon as I change the OS language to anything other than English, TalkBack starts to speak those English words using the pronunciation of the OS language, which is weird and hard to understand.
How can I declare to the Android OS what the language of my fallback resources is so that TalkBack can choose the correct pronunciation to use?
Unfortunately, as far as I know Talkback doesn't support auto language switching. Google TTS seems to do some auto switching based on non-latin characters these days, but for latin languages it just doesn't do anything except keep the phone language. So, I'm afraid there's nothing you can do to facilitate this.
Create a strings.xml variation for english and leave it like this
<resources ...>
</resources>
According to the official doc:
https://developer.android.com/training/basics/supporting-devices/languages
https://developer.android.com/guide/topics/resources/providing-resources#AlternativeResources
You can create different values-xx folder to support different languages!
Hope this can help you!

Android Library to Support Indian Languages

I am writing an app in which I have to support all Indian languages and for that I am looking for some third party library (free or paid)
I googled many times for the same but I did not get any decent option (library)
I just got use strings.xml for (English, Hindi) in their respective folders.
But I have seen in Whatsapp there is a multilanguage option, which supports almost all major indian languages
For an Example : If I do select Hindi language, so it translates complete app in Hindi language only
Same kind of functionality, I need in my app, like in drop down, If user do tap on any of the Indian language, my app has to converted in same one only (Like: Hindi, Telugu, Marathi, Gujarati and others)
What would be the best way of doing this and getting it done?
It depends what do you mean by "support"
Android supports all Indic languages. But it is not localized in all them.
Because of that, some of them cannot be selected from Settings.
But if you can provide string.xml files for all of them, and put them in the proper values-xy folder.
Possible problems:
How to select a language that the OS does not support? Have your own language selection. Once a locale is selected, call Locale.setDefault (to change the formatters), and change the resource loading configuration (Set Locale programmatically)
You see squares. This means missing fonts. Android has fonts for all the Indic scripts. But older phones might miss some. And OEMs might remove some to reduce size. So you can embed the proper Noto fonts in your application and use them (https://www.google.com/get/noto/). Use styles, and have language specific style sheets.
Keyboard missing. Install one. Here is the Google one: https://play.google.com/store/apps/details?id=com.google.android.apps.inputmethod.hindi. But there are also third party ones, for instance https://play.google.com/store/apps/details?id=org.smc.inputmethod.indic

Delphi Arabic character display issue on android

i am using arabic characters for the first time in my app
this is how they should look like :
But this is how they end up :
things i tried:
changed the phone language to arabic.
i chose this font :Arabic type settings. i found in the fonts list
things works well for windows, its only in Android i get the problem.
i believe i am missing something because i never used arabic in apps before.
i appreciate your help.
Fire Monkey does not support right-to-left languages like Arabic. Unfortunately your chosen framework is not capable of meeting your needs. You will need to find a different tool to write your app.

Android studio and localizing apps

I'm currently working on an app, which will be used (hopefully) by various tourist to my city. as such, i would like to complement as many languages as i can, and i have the appropriate translators to do so. I've read and started to implement the various different resources in the res folder, i already have some translated, i have a folder for each language as described in the guide from google.
How do I make the app initiate as non-English language in my phone while testing? for example Spanish. every time i run it, it's always English, and i would like to see that the app also works in the other languages, but i can't find anywhere how to initiate it.
I realize I might be simply overlooking something basic.
Thanks.
The language of the app is based on the system language. You need to change the language in Settings -> Language & input.
Change phone language from Settings->Language & input
If you use a physico-chimiques devices you have to change the languages of your device
If you use a emulator I think you can set the language on the creation.
If your tester have a android with spanish language, the app will be automatically on spanish. (if you create a filé string.xml in a values-es folder)

Android how to display English for phone with any languages

I'm developing an app and would like to use only English (for now) for all different languages on a user phone.
Is that by default the (values/strings.xml) will be used for all or do I have to copy/replicate all the (values/strings.xml, values-es/strings.xml, values-fr/strings.xml, etc.) with English in them?
Thanks.
Just put your English strings in values/strings.xml and all users using your app will see English.
When you are ready to support additional languages, you can refer to Android doc on language support.

Categories

Resources