Adding language detection
This commit is contained in:
parent
355ef79d20
commit
21146549f7
@ -66,6 +66,7 @@
|
||||
"feather-icons": "^4.5.0",
|
||||
"html-webpack-plugin": "^2.30.1",
|
||||
"i18next": "^10.3.0",
|
||||
"i18next-browser-languagedetector": "^2.1.0",
|
||||
"jest": "^22.2.2",
|
||||
"json-loader": "^0.5.7",
|
||||
"npm-run-all": "^4.1.2",
|
||||
|
@ -1,10 +1,12 @@
|
||||
import i18n from 'i18next';
|
||||
import { reactI18nextModule } from 'react-i18next';
|
||||
import LangDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
import locales from './locales';
|
||||
|
||||
i18n
|
||||
.use(reactI18nextModule)
|
||||
.use(LangDetector)
|
||||
.init({
|
||||
fallbackLng: 'en',
|
||||
debug: (process.env.NODE_ENV !== 'production'),
|
||||
|
@ -3662,6 +3662,10 @@ husky@^0.14.3:
|
||||
normalize-path "^1.0.0"
|
||||
strip-indent "^2.0.0"
|
||||
|
||||
i18next-browser-languagedetector@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-2.1.0.tgz#1b0e17b09507f84e7a1fa761539a07544f92a0df"
|
||||
|
||||
i18next@^10.3.0:
|
||||
version "10.3.0"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-10.3.0.tgz#6866d14f6ae7b3629921f78bc028d04914f0654c"
|
||||
|
Loading…
Reference in New Issue
Block a user