Add config system

Introduce ability to change default settings for the app.
Currently starting with disabling i18n debug on prod server

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
This commit is contained in:
Sudhanshu Gautam 2019-09-13 02:39:28 +05:30
parent b835f928a4
commit 7ad08e79c9
3 changed files with 14 additions and 1 deletions

View file

@ -3,6 +3,7 @@ import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import translationEN from './locales/en.json';
import translationDE from './locales/de.json';
import Config from './config';
const resources = {
en: {
@ -19,7 +20,7 @@ i18n
.init({
resources,
fallbackLng: 'en',
debug: true,
debug: Config.settings.i18nDebug,
interpolation: {
escapeValue: false, // not needed for react as it escapes by default
},