Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { TranslatorContext, Storage } from 'react-jhipster';
import { setLocale } from 'app/shared/reducers/locale';
TranslatorContext.setDefaultLocale('en');
TranslatorContext.setRenderInnerTextForMissingKeys(false);
export const languages: any = {
en: { name: 'English' }
// jhipster-needle-i18n-language-key-pipe - JHipster will add/remove languages in this object
};
export const locales = Object.keys(languages).sort();
export const registerLocale = store => {
store.dispatch(setLocale(Storage.session.get('locale', 'en')));
};
import { TranslatorContext, Storage } from 'react-jhipster';
import { setLocale } from 'app/shared/reducers/locale';
TranslatorContext.setDefaultLocale('en');
TranslatorContext.setRenderInnerTextForMissingKeys(false);
export const languages: any = {
nl: { name: 'Nederlands' },
en: { name: 'English' }
// jhipster-needle-i18n-language-key-pipe - JHipster will add/remove languages in this object
};
export const locales = Object.keys(languages).sort();
export const registerLocale = store => {
store.dispatch(setLocale(Storage.session.get('locale', 'en')));
};
import { TranslatorContext, Storage } from 'react-jhipster';
import { setLocale } from 'app/shared/reducers/locale';
TranslatorContext.setDefaultLocale('zh-cn');
TranslatorContext.setRenderInnerTextForMissingKeys(false);
export const languages: any = {
'zh-cn': { name: '中文(简体)' },
'zh-tw': { name: '繁體中文' },
en: { name: 'English' }
// jhipster-needle-i18n-language-key-pipe - JHipster will add/remove languages in this object
};
export const locales = Object.keys(languages).sort();
export const registerLocale = store => {
store.dispatch(setLocale(Storage.session.get('locale', 'zh-cn')));
};