I18n template
Switch branches/tags
Nothing to show
Clone or download
hiaw Merge pull request #1 from di/clearer-readme
Clearer instructions for requiring
Latest commit db92a74 Nov 22, 2016
Permalink
Failed to load latest commit information.
example update example with latest code Aug 26, 2016
I18n.js change folder name Aug 26, 2016
README.md Clearer instructions for requiring Nov 21, 2016
af.json added languages from android Aug 17, 2016
am.json added languages from android Aug 17, 2016
ar.json move the files to root so git clone instructions would work Aug 16, 2016
bg.json added languages from android Aug 17, 2016
ca.json move the files to root so git clone instructions would work Aug 16, 2016
cs.json move the files to root so git clone instructions would work Aug 16, 2016
da.json move the files to root so git clone instructions would work Aug 16, 2016
de.json move the files to root so git clone instructions would work Aug 16, 2016
el.json move the files to root so git clone instructions would work Aug 16, 2016
english.json change folder name Aug 26, 2016
es.json move the files to root so git clone instructions would work Aug 16, 2016
et.json added languages from android Aug 17, 2016
fi.json move the files to root so git clone instructions would work Aug 16, 2016
fil.json added languages from android Aug 17, 2016
fr.json move the files to root so git clone instructions would work Aug 16, 2016
he.json move the files to root so git clone instructions would work Aug 16, 2016
hi.json move the files to root so git clone instructions would work Aug 16, 2016
hr.json move the files to root so git clone instructions would work Aug 16, 2016
hu.json move the files to root so git clone instructions would work Aug 16, 2016
id.json move the files to root so git clone instructions would work Aug 16, 2016
it.json move the files to root so git clone instructions would work Aug 16, 2016
ja.json move the files to root so git clone instructions would work Aug 16, 2016
ko.json move the files to root so git clone instructions would work Aug 16, 2016
lt.json added languages from android Aug 17, 2016
lv.json added languages from android Aug 17, 2016
ms.json move the files to root so git clone instructions would work Aug 16, 2016
nb.json move the files to root so git clone instructions would work Aug 16, 2016
nl.json move the files to root so git clone instructions would work Aug 16, 2016
no.json added languages from android Aug 17, 2016
pl.json move the files to root so git clone instructions would work Aug 16, 2016
platform.languages.txt change folder name Aug 26, 2016
pt.json move the files to root so git clone instructions would work Aug 16, 2016
ro.json move the files to root so git clone instructions would work Aug 16, 2016
ru.json move the files to root so git clone instructions would work Aug 16, 2016
sk.json move the files to root so git clone instructions would work Aug 16, 2016
sl.json added languages from android Aug 17, 2016
sr.json added languages from android Aug 17, 2016
sv.json move the files to root so git clone instructions would work Aug 16, 2016
sw.json added languages from android Aug 17, 2016
th.json move the files to root so git clone instructions would work Aug 16, 2016
tr.json move the files to root so git clone instructions would work Aug 16, 2016
uk.json move the files to root so git clone instructions would work Aug 16, 2016
vi.json move the files to root so git clone instructions would work Aug 16, 2016
zh.json move the files to root so git clone instructions would work Aug 16, 2016
zu.json added languages from android Aug 17, 2016

README.md

Idea

Shipping app with localization for all available languages. The main idea here is to minimise the memory required of other languages that is not used by the platform.

For example if the phone is localized in French, then this will only load the French and English translations into memory and ignore the 30+ other languages available.

English translation is set as default fallback in case some translations are not available in the chosen language.

Installation

First install i18n into your react native project

npm install --save react-native-i18n
react-native link

Then clone this project to your within your project, removing the git repo and example afterwards.

git clone --depth 1 https://github.com/hiaw/rn-translate-template I18n
rm -rf I18n/.git I18n/example

Then require the I18n.js file within your main App.js file

require('./I18n/I18n.js');

To use the translation in app.

import I18n from 'react-native-i18n';

render() {
...
{ I18n.t('welcome') }
...
}