Vishal Vishvakarma
Vishal Vishvakarma

Reputation: 33

localization is not working in android Jellybean 4.2.2

Localization is not working in Jellybeans 4.2.2 , I am using this code and it is working fine upper devices the lollipop it works when change the phone's language. give any solution

 Resources resources = context.getResources();
    DisplayMetrics dm = resources.getDisplayMetrics();
    Configuration config = resources.getConfiguration();
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        config.setLocale(new Locale(localeCode.toLowerCase()));
    } else {
        config.locale = new Locale(localeCode.toLowerCase());
    }
    resources.updateConfiguration(config, dm);

Can anyone Help me Out....

Upvotes: 1

Views: 55

Answers (0)

Related Questions