Files
react-native-web/website/guides/internationalization.md
Nicolas Gallagher 3026465ae3 Monorepo
Introduces a monorepo structure, relies on yarn workspaces to share
dependencies, and lerna for syncing versions across the monorepo.

* Create 2 workspaces:
    'packages' and 'website'
* Create 2 public packages:
    'babel-plugin-react-native-web' and 'react-native-web'
* Create 1 private package:
    'benchmarks'

A simple release script runs the tests, builds the package assets,
increments the package version numbers, git commits and tags, publishes
the package to npm, pushes the changes to github, and releases the
website update.

Close #657
2017-12-24 12:33:41 +00:00

689 B

Internationalization

To support right-to-left languages, application layout can be automatically flipped from LTR to RTL. The I18nManager API can be used to help with more fine-grained control and testing of RTL layouts.

Working with icons and images

Icons and images that must match the LTR or RTL layout of the app need to be manually flipped.

Either use a transform style:

<Image
  source={...}
  style={{ transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }] }}
/>

Or replace the source asset:

import imageSourceLTR from './back.png';
import imageSourceRTL from './forward.png';

<Image
  source={I18nManager.isRTL ? imageSourceRTL : imageSourceLTR}
/>