问题
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:
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);
来源:https://stackoverflow.com/questions/58446637/force-ltr-on-expo-on-android