Android Studio use one specific language for all other than default - android-studio

How do I set Android Studio project to use English translation for all locales other than the default language? If I have values/ and values-en/ directories, I want all locales other than the default to use the English translation.

I think you should a bit change your mind and think that all locales should use English translation but in one case (let's say for Spanish) should be no-English. Set values as your English directory and values-xxx for this as you said default case.
If a guy would have a phone with this default locale, he would have no-English translation, otherwise it would be translated to English.
Hope it will help

Related

Django, i18n, problems with translation after changing LANGUAGE_CODE

I have created a multilingual website using Django i18n. But later I needed to change the default language (before LANGUAGE_CODE='ru') to one of those that were in the LANGUAGES configuration setting (now LANGUAGE_CODE='uk').
After that, when the user opens this site and selects the language 'ru', the translation does not work correctly. The models translate correctly, but the templates remain in 'uk'.
At the same time, when the user opens this website and selects the language 'uk' or 'en', the translation works without problems.
Tell me please, what is the reason and how can I solve this problem, or at least where it would be reasonable to search?
The problem was that the translation from Russian into Russian was not completed, so the translation from Russian into Ukrainian was taken.
While the default was Russian, no translation was made at all, since there is no translation to this node in the default language. And when it became Ukrainian, in the absence of a translation, translation into Ukrainian began to be used.

Is Android device's locale based solely on Language setting?

If the device chooses French as the language, will the locale automatically set to French as well? Or does it depend on user's current location?
For iOS, language and region are separate settings while in Android, seems like we only get to choose Language but not the region.
Comparison:
Android - Chooses French language, locale becomes fr-FR
iOS - Chooses English language, French region, locale becomes en-FR
For Android is there any other way to retrieve device's region?
I have been Googling around but couldn't find a good source of information on this topic yet.
In Android you can select Portuguese (Portugal) or Portuguese (Brasil) which translates to pt-PT and pt-BR. In this case there are two different languages, which I personally find it redundant, because the better way of handling this would be to separate languages and regions.
However you can programmatically change the language and region, by setting:
new Locale("pt", "PT");
You can read more about programmatically changing the language here:
http://gunhansancar.com/change-language-programmatically-in-android/
http://www.sureshjoshi.com/mobile/changing-android-locale-programmatically/
or anywhere on Stackoverflow :) there are lots of articles written about it

How to add Traditional Chinese in Translations Editor of Android Studio?

Had tried looking over several times but still can't find Traditional Chinese or zh-tw in "Add Locale" list.
It's hard to believe because this list contains a huge amount of locales, including even the locale that might not be used by anyone like "Zhuang; Chuang".
Is there a way using Android Studio to add translations of Traditional Chinese?
Open "src\main\res" directory of your project in the explorer/finder, you will see the folder "value-zh" if you added Chinese in Android studio.
Simply make a copy and rename them to:
"values-zh-rCN" for simplified Chinese
and "values-zh-rTW" for all traditional Chinese
And android studio will automatically recognise that:
See this as an example: https://android.googlesource.com/platform/packages/apps/Settings/+/master/res/
See more from this answer: Simplified and Traditional Chinese vs Regions

Where can I set the second language for JHipster when I run "yo jhipster" and say yes to internationalization?

By default we get English and French. I would like to get Spanish. Can someone tell me where to change the second language from French to Spanish?
First you have to install Spanish and then you can remove French.
You can find the instructions here: Installing new languages
Though there are instructions to remove an existing language (at the end of the page) I have found more practical to just leave the files for the default languages (English and French) because they are going to reappear when you update jHipster version. If you don't want them in the menu, just delete the value in the file src/main/webapp/components/language/language.service.js:
.constant('LANGUAGES', [
'en', /* 'fr', */
//JHipster will add new languages here
'es'
]

using different themes for different languages with i18n in drupal 6

I am developing a website which has both English and Arabic versions. I have installed Arabic language and the i18n module, which is working fine and I am able to add Arabic translation for the English contents.The URL prefix 'site.com/ar' is also working fine.
Since Arabic is a right-to-left language I want to show different theme for the Arabic content,which contains images with Arabic text etc.(a flipped or mirror version of the English theme with Arabic text).
Is there any good solution for this scenario where site.com/ar should show the Arabic theme and site.com/en should show the English theme?
Thanks,
You may be able to use the Sections module to switch the themes, based on the path.
I'm not sure if this would help with right-to-left languages, but you may also consider adding body classes based on the language and using those to modify the theme.
You may also find Notes on Setting up a Drupal Site for Internationalization and/or Internationalization & RTL Drupal Theming helpful.

Resources