Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ForceRTL(false) is not working as intended #46206

Closed
fawzi-shiyyab19 opened this issue Aug 25, 2024 · 9 comments
Closed

ForceRTL(false) is not working as intended #46206

fawzi-shiyyab19 opened this issue Aug 25, 2024 · 9 comments
Labels
Resolution: Answered When the issue is resolved with a simple answer Type: Unsupported Version Issues reported to a version of React Native that is no longer supported

Comments

@fawzi-shiyyab19
Copy link

Description

When i change language to english
I18nManager.allowRTL(false);
I18nManager.forceRTL(false);
forceRTL(false) is not working on when device language is set to Arabic or RTL language
Screenshot 2024-08-25 at 12 04 32 PM

Steps to reproduce

1- Set the device language to Arabic
2- Open the app
3- change language to english
4- I18nManager.isRTL is always true

React Native Version

0.72.4

Affected Platforms

Runtime - Android

Output of npx react-native info

System:
  OS: macOS 14.3
  CPU: (10) arm64 Apple M1 Pro
  Memory: 63.81 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 21.7.1
    path: /opt/homebrew/bin/node
  Yarn:
    version: 1.22.21
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.5.0
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2024.03.18.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.13.0
    path: /Users/fawziakef/.rvm/gems/ruby-2.7.4/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.2
      - iOS 17.2
      - macOS 14.2
      - tvOS 17.2
      - visionOS 1.0
      - watchOS 10.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.2/15C500b
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/fawziakef/.rvm/rubies/ruby-2.7.4/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.4
    wanted: 0.72.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

No crash or failure

Reproducer

https://github.com/react-native-community/reproducer-react-native

Screenshots and Videos

Screenshot 2024-08-25 at 12 04 32 PM
@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. labels Aug 25, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

@react-native-bot
Copy link
Collaborator

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@react-native-bot react-native-bot added Type: Unsupported Version Issues reported to a version of React Native that is no longer supported and removed Needs: Triage 🔍 labels Aug 25, 2024
@react-native-bot
Copy link
Collaborator

⚠️ Unsupported Version of React Native
ℹ️ It looks like your issue or the example you provided uses an unsupported version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.

@react-native-bot
Copy link
Collaborator

⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

@fawzi-shiyyab19 fawzi-shiyyab19 changed the title I18nManager.forceRTL NOT WORKING ForceRTL(false) is not working as intended Aug 25, 2024
@cortinico
Copy link
Contributor

@fawzi-shiyyab19 missing reproducer

@Khalid-Badawi2001
Copy link

hi fawzi, did u find a way around this crap issue?

@a-eid
Copy link

a-eid commented Sep 7, 2024

I have have kinda the same issue where I18nManager.forceRTL(true) doesn't work on android.

@a-eid
Copy link

a-eid commented Sep 11, 2024

if my case I had to add android:supportsRtl="true" in the manifest file.

I have have kinda the same issue where I18nManager.forceRTL(true) doesn't work on android.

@fawzi-shiyyab19
Copy link
Author

adding android:supportsRtl="true" to android/app/src/main/AndroidManifest.xmlsolved the issue

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Sep 23, 2024
@cortinico cortinico added Resolution: Answered When the issue is resolved with a simple answer and removed Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Needs: Attention Issues where the author has responded to feedback. labels Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Answered When the issue is resolved with a simple answer Type: Unsupported Version Issues reported to a version of React Native that is no longer supported
Projects
None yet
Development

No branches or pull requests

6 participants
@cortinico @a-eid @react-native-bot @fawzi-shiyyab19 @Khalid-Badawi2001 and others