Created
April 15, 2019 13:09
-
-
Save bodrovis/5398668dad788c708146c0d2c064fd33 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const locales = { // 1 | |
en: { | |
welcome: 'Welcome to our demo!' | |
}, | |
ru: { | |
welcome: 'Добро пожаловать в наше демо!' | |
}, | |
}; | |
i18next.init({ | |
lng: 'en', | |
fallbackLng: 'ru', | |
whitelist: ['en', 'ru'], | |
resources: { | |
en: { translation: locales.en }, // 2 | |
ru: { translation: locales.ru }, // 3 | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment