diff --git a/public/languages/actions/ar/translation.json b/public/locales/actions/ar/translation.json similarity index 100% rename from public/languages/actions/ar/translation.json rename to public/locales/actions/ar/translation.json diff --git a/public/languages/actions/de/translation.json b/public/locales/actions/de/translation.json similarity index 100% rename from public/languages/actions/de/translation.json rename to public/locales/actions/de/translation.json diff --git a/public/languages/actions/en/translation.json b/public/locales/actions/en/translation.json similarity index 100% rename from public/languages/actions/en/translation.json rename to public/locales/actions/en/translation.json diff --git a/public/languages/actions/es/translation.json b/public/locales/actions/es/translation.json similarity index 100% rename from public/languages/actions/es/translation.json rename to public/locales/actions/es/translation.json diff --git a/public/languages/actions/in/translation.json b/public/locales/actions/in/translation.json similarity index 100% rename from public/languages/actions/in/translation.json rename to public/locales/actions/in/translation.json diff --git a/public/languages/actions/ja/translation.json b/public/locales/actions/ja/translation.json similarity index 100% rename from public/languages/actions/ja/translation.json rename to public/locales/actions/ja/translation.json diff --git a/public/languages/actions/pt/translation.json b/public/locales/actions/pt/translation.json similarity index 100% rename from public/languages/actions/pt/translation.json rename to public/locales/actions/pt/translation.json diff --git a/public/languages/actions/ru/translation.json b/public/locales/actions/ru/translation.json similarity index 100% rename from public/languages/actions/ru/translation.json rename to public/locales/actions/ru/translation.json diff --git a/public/languages/actions/zr/translation.json b/public/locales/actions/zr/translation.json similarity index 100% rename from public/languages/actions/zr/translation.json rename to public/locales/actions/zr/translation.json diff --git a/public/languages/dashboard/ar/translation.json b/public/locales/dashboard/ar/translation.json similarity index 100% rename from public/languages/dashboard/ar/translation.json rename to public/locales/dashboard/ar/translation.json diff --git a/public/languages/dashboard/de/translation.json b/public/locales/dashboard/de/translation.json similarity index 100% rename from public/languages/dashboard/de/translation.json rename to public/locales/dashboard/de/translation.json diff --git a/public/languages/dashboard/en/translation.json b/public/locales/dashboard/en/translation.json similarity index 100% rename from public/languages/dashboard/en/translation.json rename to public/locales/dashboard/en/translation.json diff --git a/public/languages/dashboard/es/translation.json b/public/locales/dashboard/es/translation.json similarity index 100% rename from public/languages/dashboard/es/translation.json rename to public/locales/dashboard/es/translation.json diff --git a/public/languages/dashboard/in/translation.json b/public/locales/dashboard/in/translation.json similarity index 100% rename from public/languages/dashboard/in/translation.json rename to public/locales/dashboard/in/translation.json diff --git a/public/languages/dashboard/ja/translation.json b/public/locales/dashboard/ja/translation.json similarity index 100% rename from public/languages/dashboard/ja/translation.json rename to public/locales/dashboard/ja/translation.json diff --git a/public/languages/dashboard/pt/translation.json b/public/locales/dashboard/pt/translation.json similarity index 100% rename from public/languages/dashboard/pt/translation.json rename to public/locales/dashboard/pt/translation.json diff --git a/public/languages/dashboard/ru/translation.json b/public/locales/dashboard/ru/translation.json similarity index 100% rename from public/languages/dashboard/ru/translation.json rename to public/locales/dashboard/ru/translation.json diff --git a/public/languages/dashboard/zr/translation.json b/public/locales/dashboard/zr/translation.json similarity index 100% rename from public/languages/dashboard/zr/translation.json rename to public/locales/dashboard/zr/translation.json diff --git a/public/languages/patient/ar/translation.json b/public/locales/patient/ar/translation.json similarity index 100% rename from public/languages/patient/ar/translation.json rename to public/locales/patient/ar/translation.json diff --git a/public/languages/patient/de/translation.json b/public/locales/patient/de/translation.json similarity index 100% rename from public/languages/patient/de/translation.json rename to public/locales/patient/de/translation.json diff --git a/public/languages/patient/en/translation.json b/public/locales/patient/en/translation.json similarity index 100% rename from public/languages/patient/en/translation.json rename to public/locales/patient/en/translation.json diff --git a/public/languages/patient/es/translation.json b/public/locales/patient/es/translation.json similarity index 100% rename from public/languages/patient/es/translation.json rename to public/locales/patient/es/translation.json diff --git a/public/languages/patient/in/translation.json b/public/locales/patient/in/translation.json similarity index 100% rename from public/languages/patient/in/translation.json rename to public/locales/patient/in/translation.json diff --git a/public/languages/patient/ja/translation.json b/public/locales/patient/ja/translation.json similarity index 100% rename from public/languages/patient/ja/translation.json rename to public/locales/patient/ja/translation.json diff --git a/public/languages/patient/pt/translation.json b/public/locales/patient/pt/translation.json similarity index 100% rename from public/languages/patient/pt/translation.json rename to public/locales/patient/pt/translation.json diff --git a/public/languages/patient/ru/translation.json b/public/locales/patient/ru/translation.json similarity index 100% rename from public/languages/patient/ru/translation.json rename to public/locales/patient/ru/translation.json diff --git a/public/languages/patient/zr/translation.json b/public/locales/patient/zr/translation.json similarity index 100% rename from public/languages/patient/zr/translation.json rename to public/locales/patient/zr/translation.json diff --git a/public/languages/patients/ar/translation.json b/public/locales/patients/ar/translation.json similarity index 100% rename from public/languages/patients/ar/translation.json rename to public/locales/patients/ar/translation.json diff --git a/public/languages/patients/de/translation.json b/public/locales/patients/de/translation.json similarity index 100% rename from public/languages/patients/de/translation.json rename to public/locales/patients/de/translation.json diff --git a/public/languages/patients/en/translation.json b/public/locales/patients/en/translation.json similarity index 100% rename from public/languages/patients/en/translation.json rename to public/locales/patients/en/translation.json diff --git a/public/languages/patients/es/translation.json b/public/locales/patients/es/translation.json similarity index 100% rename from public/languages/patients/es/translation.json rename to public/locales/patients/es/translation.json diff --git a/public/languages/patients/in/translation.json b/public/locales/patients/in/translation.json similarity index 100% rename from public/languages/patients/in/translation.json rename to public/locales/patients/in/translation.json diff --git a/public/languages/patients/ja/translation.json b/public/locales/patients/ja/translation.json similarity index 100% rename from public/languages/patients/ja/translation.json rename to public/locales/patients/ja/translation.json diff --git a/public/languages/patients/pt/translation.json b/public/locales/patients/pt/translation.json similarity index 100% rename from public/languages/patients/pt/translation.json rename to public/locales/patients/pt/translation.json diff --git a/public/languages/patients/ru/translation.json b/public/locales/patients/ru/translation.json similarity index 100% rename from public/languages/patients/ru/translation.json rename to public/locales/patients/ru/translation.json diff --git a/public/languages/patients/zr/translation.json b/public/locales/patients/zr/translation.json similarity index 100% rename from public/languages/patients/zr/translation.json rename to public/locales/patients/zr/translation.json diff --git a/src/i18n.js b/src/i18n.js index 31835373b1..ee02f75eb2 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -3,8 +3,9 @@ import Backend from 'i18next-xhr-backend' import LanguageDetector from 'i18next-browser-languagedetector' import { initReactI18next } from 'react-i18next' +import * as en from './example.json'; i18n - // load translation using xhr -> see /public/app-sections/languages + // load translation using xhr -> see /public/languages // learn more: https://github.com/i18next/i18next-xhr-backend .use(Backend) // detect user language @@ -15,6 +16,24 @@ i18n // init i18next // for all options read: https://www.i18next.com/overview/configuration-options .init({ + // we init with resources + resources: { + en: { + translations: { + "To get started, edit <1>src/App.js and save to reload.": + "To get started, edit <1>src/App.js and save to reload.", + "Welcome to React": "Welcome to React and react-i18next", + welcome: "Hello
World" + } + }, + de: { + translations: { + "To get started, edit <1>src/App.js and save to reload.": + "Starte in dem du, <1>src/App.js editierst und speicherst.", + "Welcome to React": "Willkommen bei React und react-i18next" + } + } + }, fallbackLng: 'en', debug: true,