Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

react native - I18nManager.forceRtl(false) does not work in android

I want to disable forced-rtl in android device having (rtl-device-language) by calling:

await I18nManager.forceRTL(false);
RNRestart.Restart();

but the same code works when switching device-lang to (LTR-lang)

How can I disable RTL in an android device having (RTL-device-lang) ...

any suggestion ... any help ... anything ... is welcome


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

use this in index.js file :

I18nManager.allowRTL(false);
I18nManager.forceRTL(false);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...