People.Client: deleted unsused i18n config
This commit is contained in:
parent
d3de82615a
commit
5128a3e882
@ -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;
|
@ -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")
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user