Description
When toggling RTL layout direction dynamically using I18nManager.forceRTL(true) or switching between languages in the system settings, the Yoga layout engine does not immediately apply the updated layout direction. Even with a forced app restart (e.g., via RNRestart), the changes are not respected.
A complete termination and relaunch of the app is required for the changes to take effect. This creates significant friction for users and developers aiming to support dynamic language and layout changes for right-to-left (RTL) languages.
Report
Issues and Steps to Reproduce
Toggle RTL programmatically:
I18nManager.forceRTL(true);
I18nManager.allowRTL(true);
RNRestart.Restart();
Alternatively, change the device language to an RTL language (e.g., Arabic ) in the app settings. ( assuming you added such functionality )
Observe that the layout direction does not change immediately.
Terminate the app completely and relaunch it manually. Only then does the layout respect the RTL direction.
Expected Behavior
the layout direction should change.
Actual Behavior
the layout direction does not change.
related react-native Issue
Description
When toggling RTL layout direction dynamically using I18nManager.forceRTL(true) or switching between languages in the system settings, the Yoga layout engine does not immediately apply the updated layout direction. Even with a forced app restart (e.g., via RNRestart), the changes are not respected.
A complete termination and relaunch of the app is required for the changes to take effect. This creates significant friction for users and developers aiming to support dynamic language and layout changes for right-to-left (RTL) languages.
Report
Issues and Steps to Reproduce
Toggle RTL programmatically:
Alternatively, change the device language to an RTL language (e.g., Arabic ) in the app settings. ( assuming you added such functionality )
Observe that the layout direction does not change immediately.
Terminate the app completely and relaunch it manually. Only then does the layout respect the RTL direction.
Expected Behavior
the layout direction should change.
Actual Behavior
the layout direction does not change.
related react-native Issue