androidreact-nativeexporight-to-left

Force LTR on Expo on Android


I am creating an app with React Native with Expo and I can't find a solution do force LTR (left-to-right) direction. Some of my users have its phone with RTL languages, but I only have English and Norwegian, so it doesn't make sense to show text in RTL in English.

I am also using i18next for translation.

Any ideas on how to solve this? Force LTR.


Solution

  • Just found my solution after more digging.

    On App.js import the following library:

    import { I18nManager } from "react-native";
    

    Then right after the imports use the following code:

    I18nManager.forceRTL(false);
    I18nManager.allowRTL(false);