Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions library/src/constants/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import ptDateLocale from 'date-fns/locale/pt';
import daDateLocale from 'date-fns/locale/da';
import jaDateLocale from 'date-fns/locale/ja';
import zhCNDateLocale from 'date-fns/locale/zh-CN';
import ukrDateLocale from 'date-fns/locale/uk';
import huDateLocale from 'date-fns/locale/hu';
import itDateLocale from 'date-fns/locale/it';
import nlDateLocale from 'date-fns/locale/nl';
import noDateLocale from 'date-fns/locale/nb';
import plDateLocale from 'date-fns/locale/pl';
import roDateLocale from 'date-fns/locale/ro';
import ruDateLocale from 'date-fns/locale/ru';

export const locales = {
en: {
Expand Down Expand Up @@ -72,4 +80,60 @@ export const locales = {
translations: () =>
import('../../../webapp/src/i18n/zh.json').then((m) => m.default),
},
uk: {
name: 'Українська',
flag: '🇺🇦',
dateFnsLocale: ukrDateLocale,
translations: () =>
import('../../../webapp/src/i18n/uk-UA.json').then((m) => m.default),
},
hu: {
name: 'Magyar',
flag: '🇭🇺',
dateFnsLocale: huDateLocale,
translations: () =>
import('../../../webapp/src/i18n/hu.json').then((m) => m.default),
},
it: {
name: 'Italiano',
flag: '🇮🇹',
dateFnsLocale: itDateLocale,
translations: () =>
import('../../../webapp/src/i18n/it-IT.json').then((m) => m.default),
},
nl: {
name: 'Nederlands',
flag: '🇳🇱',
dateFnsLocale: nlDateLocale,
translations: () =>
import('../../../webapp/src/i18n/nl.json').then((m) => m.default),
},
no: {
name: 'Norsk',
flag: '🇳🇴',
dateFnsLocale: noDateLocale,
translations: () =>
import('../../../webapp/src/i18n/no.json').then((m) => m.default),
},
pl: {
name: 'Polski',
flag: '🇵🇱',
dateFnsLocale: plDateLocale,
translations: () =>
import('../../../webapp/src/i18n/pl.json').then((m) => m.default),
},
ro: {
name: 'Română',
flag: '🇷🇴',
dateFnsLocale: roDateLocale,
translations: () =>
import('../../../webapp/src/i18n/ro.json').then((m) => m.default),
},
ru: {
name: 'Русский',
flag: '🇷🇺',
dateFnsLocale: ruDateLocale,
translations: () =>
import('../../../webapp/src/i18n/ru.json').then((m) => m.default),
},
};
8 changes: 8 additions & 0 deletions webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ const tolgee = Tolgee()
da: () => import('./i18n/da.json').then((m) => m.default),
ja: () => import('./i18n/ja.json').then((m) => m.default),
zh: () => import('./i18n/zh.json').then((m) => m.default),
uk: () => import('./i18n/uk-UA.json').then((m) => m.default),
hu: () => import('./i18n/hu.json').then((m) => m.default),
it: () => import('./i18n/it-IT.json').then((m) => m.default),
nl: () => import('./i18n/nl.json').then((m) => m.default),
no: () => import('./i18n/no.json').then((m) => m.default),
pl: () => import('./i18n/pl.json').then((m) => m.default),
ro: () => import('./i18n/ro.json').then((m) => m.default),
ru: () => import('./i18n/ru.json').then((m) => m.default),
},
});

Expand Down