Rocket.Chat.ReactNative/app/utils/moment.ts

17 lines
295 B
TypeScript

const localeKeys: { [key: string]: string } = {
en: 'en',
ru: 'ru',
'pt-BR': 'pt-br',
'zh-CN': 'zh-cn',
fr: 'fr',
de: 'de',
'pt-PT': 'pt',
it: 'it',
ja: 'ja',
nl: 'nl',
'es-ES': 'es',
'zh-TW': 'zh-tw'
};
export const toMomentLocale = (locale: string): string => localeKeys[locale];