No configuration setup. Wordpress compatible.

This commit is contained in:
HenriT
2021-08-30 20:44:36 +03:00
parent f3e7706506
commit 7f131c1ce5
3 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@ const initialized = i18next.init({
fallbackLng: 'en',
whitelist: ['en', 'fr', 'et', 'fa', 'bn', 'es'],
backend: {
loadPath: config.locales_url || `${window.location.origin}${process.env.BASE_URL}/locales/{{lng}}/{{ns}}.json`,
loadPath: `${config.base_url || ''}/locales/{{lng}}/{{ns}}.json`,
},
detection: {
order: ['querystring', 'path', 'localStorage', 'navigator'],