Back to articles
Why Does React Native Make You Restart the App Just to Switch Language? I Fixed It.
How-ToTools

Why Does React Native Make You Restart the App Just to Switch Language? I Fixed It.

via Dev.toIbrahim Tarhini

The frustration that started this I've always wondered: why do I need to restart my entire app just to switch from English to Arabic? On the web, you set dir="rtl" on any element and it just works. You can have LTR and RTL on the same page. You can switch direction at runtime without refreshing. It's been this way for decades. Then you come to React Native and the story is: I18nManager . forceRTL ( true ); // Now restart your app. Yes, the whole thing. That's it. That's the API. A global flag that requires a full app restart. No per-component control. No mixing LTR and RTL on the same screen. And if you're building an app for Arabic, Hebrew, Persian, or Urdu users — this is what you're stuck with. I always wished React Native had RTL capabilities similar to the web. So I built it. Introducing expo-rtl expo-rtl brings web-like RTL support to Expo and React Native: Per-component direction — flip individual components or subtrees with a dir prop No restart required — switch locale and dir

Continue reading on Dev.to

Opens in a new tab

Read Full Article
7 views

Related Articles