I18nManager

Control and query the layout and writing direction of the application.

import { I18nManager } from 'react-native';

API #

Static methods #

allowRTL (boolean) => void

Allow the application to display in RTL mode.

forceRTL (boolean) => void

Force the application to display in RTL mode.

getConstants () => I18nConstants

Determine how the application is handling bidi layout.

swapLeftAndRightInRTL (boolean) => void

Control whether the application swaps left/right styles in RTL mode. It is recommended that applications rely on start/end styles and disable automatic BiDi-flipping of left/right styles.

setPreferredLanguageRTL (boolean) => void

Set the application’s preferred writing direction to RTL. You may need to infer the user’s preferred locale on the server (from HTTP headers) and decide whether it’s an RTL language. (Web-only)

I18nConstants #

The object returned by I18nManager.getConstants().

isRTL boolean = false

Whether the application is currently in RTL mode.

doLeftAndRightSwapInRTL boolean = true

Whether the application swaps left/right styles in RTL mode.


Examples #

Updated
Edit
React Native for WebCopyright © Nicolas Gallagher and Facebook Inc.