Skip to content

Apply I18nManager.forceRTL() at runtime - #60460

Open
zoontek wants to merge 3 commits into
react:mainfrom
zoontek:rtl-rework-3
Open

zoontek wants to merge 3 commits into
react:mainfrom
zoontek:rtl-rework-3

Conversation

@zoontek

@zoontek zoontek commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Part 3 of 3 of the I18nManager rework (RFC, split from #59404). Depends on #60458 and #60459, review the last commit only.

  • forceRTL applies at runtime: surfaces lay out again and isRTL updates immediately (bridgeless only). The value is no longer persisted.
  • Native forceRTL now returns the new isRTL. JS updates isRTL only when it gets a boolean, so an older binary keeps the old behavior (applied on the next reload).

This comes after the swap removal because the swap mutates props and cannot be undone, so toggling at runtime would leave views swapped.

Changelog:

[GENERAL] [BREAKING] - Apply I18nManager.forceRTL at runtime and stop persisting its value
[ANDROID] [BREAKING] - Remove the Context parameter from I18nUtil.forceRTL

Test Plan:

Flow, Jest (I18nManager-test.js), the generated TypeScript and C++ API snapshots, and the format checks pass. RNTester's RTL example toggles forceRTL without a reload:

RTL.-.Android.mp4
RTL.-.iOS.mp4

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 2, 2026
@github-actions github-actions Bot added the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

Warning

JavaScript API change detected

This PR commits an update to ReactNativeApi.d.ts, indicating a change to React Native's public JavaScript API.

  • Please include a clear changelog message.
  • This change will be subject to additional review.

This change was flagged as: POTENTIALLY_BREAKING

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Dec 2, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant