5
votes

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.

1
You can simulate RTL by enabling option in developer settings on android device or emulator.Marek Kondracki

1 Answers

10
votes

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);