People.Client: deleted unsused i18n config

This commit is contained in:
Daniil Senkiv 2019-09-03 10:34:21 +03:00
parent d3de82615a
commit 5128a3e882
2 changed files with 1 additions and 44 deletions

View File

@ -1,39 +0,0 @@
import i18n from 'i18next';
import Backend from 'i18next-xhr-backend';
//import LanguageDetector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';
import config from '../package.json';
const newInstance = i18n.createInstance();
newInstance
// load translation using xhr -> see /public/locales
// learn more: https://github.com/i18next/i18next-xhr-backend
.use(Backend)
// detect user language
// learn more: https://github.com/i18next/i18next-browser-languageDetector
//.use(LanguageDetector)
// pass the i18n instance to react-i18next.
.use(initReactI18next)
// init i18next
// for all options read: https://www.i18next.com/overview/configuration-options
.init({
lng: 'ru',
fallbackLng: 'en',
debug: true,
ns: ['PeopleJSResource', 'PeopleResource', 'Resource', 'UserControlsCommonResource'],
defaultNS: 'PeopleJSResource',
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},
backend: {
loadPath: `${config.homepage}/locales/{{lng}}/{{ns}}.json`,
},
react: {
useSuspense: false
}
});
export default newInstance;

View File

@ -7,8 +7,6 @@ import { AUTH_KEY } from "./helpers/constants";
import store from "./store/store";
import "./custom.scss";
import App from "./App";
import i18n from "./i18n";
import {I18nextProvider} from "react-i18next";
import * as serviceWorker from "./serviceWorker";
import { setIsLoaded, getUserInfo } from "./store/auth/actions";
@ -24,11 +22,9 @@ else {
}
ReactDOM.render(
<I18nextProvider i18n={i18n}>
<Provider store={store}>
<App />
</Provider>
</I18nextProvider>,
</Provider>,
document.getElementById("root")
);