Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).split(','),
monthNamesShort: formatMessage({
id: 'mobile.calendar.monthNamesShort',
defaultMessage: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec',
}).split(','),
dayNames: formatMessage({
id: 'mobile.calendar.dayNames',
defaultMessage: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday',
}).split(','),
dayNamesShort: formatMessage({
id: 'mobile.calendar.dayNamesShort',
defaultMessage: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat',
}).split(','),
};
LocaleConfig.defaultLocale = props.locale;
};
'2月',
'3月',
'4月',
'5月',
'6月',
'7月',
'8月',
'9月',
'10月',
'11月',
'12月',
],
dayNames: ['日', '月', '火', '水', '木', '金', '土'],
dayNamesShort: ['日', '月', '火', '水', '木', '金', '土'],
};
LocaleConfig.defaultLocale = 'jp';
const images = [
require('../../../img/months/january.png'),
require('../../../img/months/february.png'),
require('../../../img/months/march.png'),
require('../../../img/months/october.png'),
require('../../../img/months/october.png'),
require('../../../img/months/october.png'),
require('../../../img/months/october.png'),
require('../../../img/months/october.png'),
require('../../../img/months/october.png'),
require('../../../img/months/october.png'),
require('../../../img/months/november.png'),
require('../../../img/months/december.png'),
];
setLocale(locale: string) {
LocaleConfig.defaultLocale = locale;
numbro.registerLanguage(Languages[locale]);
numbro.setLanguage(locale);
}
}
async function loadLocal() {
const lang = await LangService.getLanguage();
if (lang) {
I18n.locale = lang;
LocaleConfig.defaultLocale = lang;
}
}
setLanguage(lang = 'en') {
LocaleConfig.defaultLocale = lang;
return this.session.set(this.langKey, lang);
}