mbco-react-native-translation
v0.0.1
Published
[![Build Status Master](https://www.bitrise.io/app/7fd1d3295e3b7f78/status.svg?token=TlIuzWPPb8khCM4MljoTjQ&branch=master)](https://www.bitrise.io/app/7fd1d3295e3b7f78)(Master)
Downloads
2
Readme
Build Status
mbco-react-native-translation
Getting started
$ npm install mbco-react-native-translation --save
or with Yarn
$ yarn add -D mbco-react-native-translation
Usage
import {setup, getTranslation} from 'mbco-react-native-translation';
setup({
fallbackLanguage: 'en',
transaltions: {
en: {
welcome: 'Welcome',
},
fr: {
welcome: 'Welcome',
},
nl: {
welcome: 'Welkom',
},
}
})
// In you code/templates
getTranslation('key')
// Or with optional parameters based on https://github.com/fnando/i18n-js
getTranslation('key', params)
ChangeLog
Version 2.0.5
- Can return translation key instead of the translation
- Can display selected language
Version 2.0.3
- Turn on default fallbacks
Version 2.0.0
- Use i18n-js instead of react-native-i18n
Version 1.1.0
- Simplified code and fixed fallback to default locale
Version 1.0.1
- Implemented basic features
Version 1.0.0
- Library created