Guest User

Untitled

a guest
Jan 16th, 2019
42
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import i18n from 'i18next';
  2. import { reactI18nextModule } from 'react-i18next';
  3. import XHR from 'i18next-xhr-backend';
  4.  
  5. i18n
  6.    .use(XHR)
  7.    .use(reactI18nextModule)
  8.    .init({
  9.       fallbackLng: 'en-GB',
  10.       lng: 'es-ES',
  11.       ns: ['common'],
  12.       defaultNs: 'common',
  13.       debug: true,
  14.       interpolation: {
  15.          escapeValue: false,
  16.       },
  17.       react: {
  18.          wait: true,
  19.       },
  20.       backend: {
  21.          loadPath: 'https://api.sitename.tld/v1/locale/{{lng}}.json',
  22.       }
  23.    }
  24. );
  25.  
  26. export default i18n;
RAW Paste Data