There's application which restricts users from opening the settings, if they tries to open settings it show login screen which he'll need to put password for managers of the app.
Now I need to add feature that makes him able to add language without opening settings. Specifically add Arabic language to the keyboard.
All I got from search that I can translate the app to another language or start intent to the specific page of adding language which is restricted as it belongs to settings package.
There's possible way to do that? by writing directly to the settings?
You can try to change the phone's Locale programmatically by this,
Locale locale = new Locale(language);
Locale.setDefault(locale);
But it will only work above API level 16.
An also after changing that you might need to change the screen configuration to apply the changes to your app.
Related
My Android application has multi language support.my problem is if I select the language(from application) then app will changed to corresponding language but keyboard is still in system language any idea to change the keyboard language too.
This isn't really that possible.
The keyboard is itself an application. Therefore, you cannot change it directly from your app, nor can you guarantee that your user will have the "Arabic" charset or addon or whatever, for they keyboard app that they employ.
Your only real and reliable solution if you wish to accomplish what you need would be to create your own keyboard input. Otherwise, it will be in the user's hands to change their keyboard to Arabic.
I want to develop an app supporting some language. I don't know how to set the locale. So user can change any language he want. Now I only know that android will try to set the XX/strings.xml automatically according to the device setting. How to set it by manual?
GO into your settings. THere should be a language and keyboards setting. Change it to whatever language you want.
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.
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.
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