localization is not working in android Jellybean 4.2.2

53 views Asked by At

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....

0

There are 0 answers