2.2.0 • Published 2 years ago

@proximus/react-native-language-translation v2.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Build Status

Build Status Master(Master)

Build Status Dev(Dev)

@proximus/react-native-language-translation

Getting started

$ npm install @proximus/react-native-language-translation --save

or with Yarn

$ yarn add -D @proximus/react-native-language-translation

Usage

import {setup, getTranslation} from '@proximus/react-native-language-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
2.2.0-beta.0

2 years ago

2.2.0-beta.1

2 years ago

2.2.0

2 years ago

2.1.7

2 years ago

2.1.7-beta

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.4

2 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.5

4 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.0

6 years ago