Akbar Begimqulov Akbar Begimqulov - 2 months ago 20
Android Question

make multi language android application

I created multi language (English, Russian, Uzbek) app. I put 4 string resoureses in 4 folders (values, values-en, values-ru, values-uz) as docs. When I change app language updates resourses configuration in App Controller like below:

Settings.LANGUAGE = prefs.getString(User.LANG, Settings.RUSSIAN);
Locale locale = new Locale(Settings.LANGUAGE);
Configuration configuration = new Configuration();
configuration.locale = locale;

After that App restarts by calling App controller's method like below:

public void reStart() {
Intent i = getBaseContext().getPackageManager()

After them It works well almost all devises. But on Samsung Galaxy S6 (SM-G920F), it works as crazy. Some words are in english and others are in Uzbek and ets.
So, How to fix this error? isn't the concepts of "Supporting Different Languages" supported by (applicable to) all devises?
By the way I have checked that all resourses are given in corresponding languages (as shown in attached image):

enter image description here


From my observations, weird behaviour was affecting only Activity titles, and I found that I was setting translations of activity titles in Manifest file. Only these translations were misbehaving. All other dynamically set translations were working fine. So, to fix the problem, I removed all activity labels from Manifest file, then set activity titles in onCreate method as below:


Problem solved.