From 6ee6b2ffeec4b38d5eff827990e80c39e5c8fd9a Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 26 Dec 2024 17:12:19 +0100 Subject: [PATCH] feat: add Korean translation for selection --- frontend/src/i18n/index.ts | 1 + frontend/src/i18n/useDayjsLanguageSync.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index 501b7bee0..c0c8f26d5 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -27,6 +27,7 @@ export const SUPPORTED_LOCALES = { 'uk-UA': 'Українська', 'lt-LT': 'Lietuvių Kalba', 'bg-BG': 'Български', + 'ko-KR': '한국어', // IMPORTANT: Also add new languages to useDayjsLanguageSync } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index 72b94f8c0..c77b6caed 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -27,6 +27,7 @@ export const DAYJS_LOCALE_MAPPING = { 'uk-UA': 'uk', 'lt-LT': 'lt', 'bg-BG': 'bg', + 'ko-KR': 'ko', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -51,7 +52,8 @@ export const DAYJS_LANGUAGE_IMPORTS = { 'pt-br': () => import('dayjs/locale/pt-br'), 'uk-ua': () => import('dayjs/locale/uk'), 'lt-lt': () => import('dayjs/locale/lt'), - 'bg-bg': () => import('dayjs/locale/bg'), + 'bg-bg': () => import('dayjs/locale/bg'), + 'ko-kr': () => import('dayjs/locale/ko'), } as Record Promise> export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {