amos amos - 1 year ago 152
Android Question

react native, set Android os default lang

I am using react-native

, and i am building react-native mobile app targeting iOS & Android.

If users have default language of
, my app looks bad on android. In order for it to look good on Android, i need the app to be open in
Language only (
language), no matter what is the Android default language.

Answer Source

got it! i needed to force LTR on an RTL OS. so i used "allowRTL"

in the android/app/src/main/java/com/[app name]/ i added "onCreate"

import com.facebook.react.modules.i18nmanager.I18nUtil;

public void onCreate() {

    // FORCE LTR
    I18nUtil sharedI18nUtilInstance = I18nUtil.getInstance();
    sharedI18nUtilInstance.allowRTL(getApplicationContext(), false);

look at:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download