Change Keyboard input language

This isn't really that possible. You can change the users locale using a number of solutions present on stackoverflow already:

Here for example, or here for another.

However, this will only change the locale. The problem you will encounter is that 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.


(API 24+): If you are using a TextView/EditText, then you can call TextView#setImeHintLocales(LocaleList)

textView.setImeHintLocales(new LocaleList(new Locale("zh", "CN")));

Note: If you want new "hint" to take effect immediately you need to call InputMethodManager#restartInput(View).