diff --git a/apps/app/i18n.ts b/apps/app/i18n.ts index 5a73036..9a542ee 100644 --- a/apps/app/i18n.ts +++ b/apps/app/i18n.ts @@ -7,37 +7,59 @@ import { es, ptBR, Locale as DateFnsLocale, - pt, + hi, + hy, + nb, + pl, + tr, + zhCN, } from 'date-fns/locale' -export type Locale = 'en' | 'fr' | 'ru' | 'de' | 'es' | 'pt_br' - -export const translations = { - en: require('./locales/en.json'), - fr: require('./locales/fr.json'), - ru: require('./locales/ru.json'), +const translations = { de: require('./locales/de.json'), + en: require('./locales/en.json'), es: require('./locales/es.json'), + fr: require('./locales/fr.json'), + hi: require('./locales/hi.json'), + hy: require('./locales/hy.json'), + nb_NO: require('./locales/nb_NO.json'), + pl: require('./locales/pl.json'), pt_br: require('./locales/pt_br.json'), + ru: require('./locales/ru.json'), + tr: require('./locales/tr.json'), + zh_Hans: require('./locales/zh_Hans.json'), } +/** We can only load font available in Inter */ export const translationsLanguages = { - en: 'English', - fr: 'Français', - ru: 'Русский', de: 'Deutsch', + en: 'English', es: 'Español', + fr: 'Français', + // hi: 'हिन्दी', + // hy: 'Հայերեն', + nb_NO: 'Bokmål', + pl: 'Polski', pt_br: 'Português brasileiro', + ru: 'Русский', + tr: 'Türkçe', + // zh_Hans: '简体字', } -export const getDateFnsLocale = (locale: Locale) => { - const localeToDateFnsLocale: Record = { - en: enUS, - fr: fr, - ru: ru, +export const getDateFnsLocale = (locale: string) => { + const localeToDateFnsLocale: Record = { de: de, + en: enUS, es: es, + fr: fr, + hi: hi, + hy: hy, + nb_NO: nb, + pl: pl, pt_br: ptBR, + ru: ru, + tr: tr, + zh_Hans: zhCN, } return localeToDateFnsLocale[locale] ?? enUS