Skip to content

Instantly share code, notes, and snippets.

@kutanov
Last active February 15, 2020 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kutanov/375b5d3a10d3c93dc63468446325f781 to your computer and use it in GitHub Desktop.
Save kutanov/375b5d3a10d3c93dc63468446325f781 to your computer and use it in GitHub Desktop.
app.js fragment
i18next
.use(Backend)
.use(i18nextMiddleware.LanguageDetector)
.init({
backend: {
loadPath: __dirname + '/locales/{{lng}}/{{ns}}.json',
},
detection: {
order: ['querystring', 'cookie'],
caches: ['cookie']
},
fallbackLng: 'en',
preload: ['en', 'ru']
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment