All Projects → Locale → amplify-i18n

Locale / amplify-i18n

Licence: MIT license
Translations for AWS Amplify

Programming Languages

javascript
184084 projects - #8 most used programming language

amplify-i18n

Centralization of locale data collection for AWS Amplify.

Installation

AWS Amplify I18n is available as amplify-i18n package on npm.

$ npm install amplify-i18n --save

Configuration

Somewhere in your app, preferably at the root level, configure Amplify I18n.

Load all locales

If you don't specify any locales to the configure method, all the available locales will be loaded.

import { I18n } from "aws-amplify"
import AmplifyI18n from "amplify-i18n"

AmplifyI18n.configure()
I18n.setLanguage("fr")

Load specific locales

If you want to load only a subset of the available locales, pass an array to the configure method.

import { I18n } from "aws-amplify"
import AmplifyI18n from "amplify-i18n"

const locales = ["en", "fr", "de"]
AmplifyI18n.configure(locales)
I18n.setLanguage("fr")

Locales

Amplify I18n follows the Best Current Practice 47 (BCP47) Tags for Identifying Languages.

Currently the following locales are available:

Tag Language
ar Arabic
de German
en English
es Spanish
fr French
he Hebrew
it Italian
ja Japanese
ko Korean
nl Dutch
pt-BR Portuguese (Brazil)
ru Russian
zh-Hans Simplified Chinese
zh-Hant Traditional Chinese

Translations are provided by Locale for the community ♥️

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].