Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable rtl when phone language changes?

i created an app in react-native ,when the phone language is En every thing goes fine but when i change the phone language the UI crashes and everything is backward i am using

"react": "16.6.3",
    "react-native": "0.58.5",
like image 926
Mohammed Fallah Avatar asked Apr 24 '19 07:04

Mohammed Fallah


1 Answers

You should disable rtl view in your app

Put this code in app.js:-

const ReactNative = require('react-native');
try {
  ReactNative.I18nManager.allowRTL(false);
} catch (e) {
  console.log(e);
}

and you should be fine.

like image 164
Roozbeh Mohammadzadeh Avatar answered Oct 04 '22 21:10

Roozbeh Mohammadzadeh