Allowing user to select app language/locale? - android

I have an Android app that I have just prepared for localization, with one locale completed and more on the way. I want to give users the option of viewing the app in a different locale (ie- language) without having to modify their system locale settings.
So, for example:
App has locale capability for en, es, zh, ja.
User has "es" selected as their system locale.
User can open the application's preferences page and select "ja" locale.
App will now display the text/formatting according to the Ja locale of the app.
Is this possible?

I stumbled onto the following stackoverflow post while on an unrelated search. This is exactly what I've been looking for.
Changing Locale within the app itself

Related

Firebase and localization

I'm working in app that support Arabic and English language using firebase database my question is there is any way I can localize data that come from firebase in my my app
Is there is any way I can localize data that come from firebase in my app?
There are many ways in which you can locate a user, but this requires enabling the device's location, asking for permissions, and so on. This option might not be the best one, because I, as a traveler, if I visit your country and download your app, I'll get Arabic content and I won't be happy with that, because I don't know Arabic. The best option that you have is to display the content according to the language the user has already set on the device. So it doesn't matter where the user is localized, the user will always see the content in the language he likes. For example, if a user from your country will travel to the United States, he will still see the content of your app in Arabic, which makes sense, because it's possible that the user might not know English.
Another option might be to let the user choose the language even from the beginning when first time opens the app. That way, you'll always be sure about the preferred language. However, don't forget to add the option to update this preference later, if needed.

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 Language support

I have an application to which I want to add Burmese Language support. Anyone any Idea how to achieve that as google translator doesn't have feature to translate to burmese.
Also I have tried Few other links which is giving me keyboard like this
http://www.stars21.com/keyboard/burmese_keyboard.html
Android official language support allows you to set the phones locale to whatever is available. The list of available locales as shown HERE.
Being on that list means: the user can set the language of the app and the whole system. And you can have folders like res/values-de to show locale specific strings.
Supporting a language which is not specified and supported in the phones is difficult. AFAIK
Burmese language is not supported by phones. You can check out List of locale supported by android.
If you are logged on your computer, go to the Set Locale and Language© site on Google Play℠ and request the installation over the web interface. Or, follow the steps below to install it in your device directly:
Open “Google Play” on your device.
Tap on “Search” and type “locale select” in the search box.
Tap on “Set Locale and Language” app, which should be the first result.
Tap on “Download” and then on the “Accept & download” button.
Wait until the app gets installed.
Now, go to the system settings of your device and choose from the new installed languages in the “Language and Input Settings” option.
Set the language you want from the available list.

Localization testing on Android - Change Application or System locale

I'm finally trying out some localization stuff on our application, and I've seem some posts regarding changing the application locale, and changing the System locale.
I've wondered if within the scope of our application, does it matters if I change the System locale or the application locale?
As far as I could notice, changing the application or the system Locale is not different with a side note that one would have to refresh the views.
I've wrote a post about my experience with Multi-Languages... leave your comments at the bottom.

How to refresh all UIs on locale update for an Android app without restarting the app?

I need my app to have all UIs refreshed to use the new locale that the user just switches to without the need of restarting the app, is there a way to do it?
When I tested my app, for example, I was using English and now I change to use French, some UIs did get updated to display in French while some remains in English. Is there anything I could have been missing?
Thanks!
If locale is changed via device settings, then default behavior for activities is they are recreated/restarted by the system automatically, giving them a chance to use proper string resources (if an app has different string resouces for different locales, of course).
This is called Сonfiguration changes. Other types of config change would be device rotation, font size change, etc. But programmers can override the default behavior iether stating in AndroidManifest.xml what confic changes to bypass OR overriding Activity.onConfigurationChanged().
So, make sure (1) you have a dedicated string resources for each supported by your app locale and (2) you don't prevent the default on config change behaviour for this type of config change.

Categories

Resources