Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import i18n from 'i18next';
- import { reactI18nextModule } from 'react-i18next';
- import XHR from 'i18next-xhr-backend';
- i18n
- .use(XHR)
- .use(reactI18nextModule)
- .init({
- fallbackLng: 'en-GB',
- lng: 'es-ES',
- ns: ['common'],
- defaultNs: 'common',
- debug: true,
- interpolation: {
- escapeValue: false,
- },
- react: {
- wait: true,
- },
- backend: {
- loadPath: 'https://api.sitename.tld/v1/locale/{{lng}}.json',
- }
- }
- );
- export default i18n;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement