Locale "ar" language change not working with Huawei Devices but working with others

Joseph Hajjar :

I'm setting android:supportsRtl="true" in manifest and calling setLocale("ar");

Locale locale = new Locale(lang);
LocaleChanger.setLocale(locale);
Intent refresh = new Intent(getContext(), MainActivity.class);
getActivity().finish();
refresh.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(refresh);

It's working perfectly with my samsung devices but not with Huawei devices . It's switching sides and the locale.default is giving me "ar" as language but for some reason it doesn't seem to detect the ar string.xml

Any idea why this is happening and a possible fix?

Edit: I must add that in debug type it works with the Huawei devices but not in release or production type.

Joseph Hajjar :

Ended up fixing it by changing from .aab to apk when I upload to the store.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=162497&siteId=1