From fcd56cb7cfa5cab8b96f1a73811b9d5330e931f5 Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 28 Oct 2024 11:27:42 +0100 Subject: [PATCH] feat(i18n): add Bulgarian for language selection --- frontend/src/i18n/index.ts | 1 + frontend/src/i18n/useDayjsLanguageSync.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index 45dd23b0e..443a17497 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -26,6 +26,7 @@ export const SUPPORTED_LOCALES = { 'hr-HR': 'Hrvatski', 'uk-UA': 'Українська', 'lt-LT': 'Lietuvių Kalba', + 'bg-BG': 'български език', // IMPORTANT: Also add new languages to useDayjsLanguageSync } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index 350949935..72b94f8c0 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -26,6 +26,7 @@ export const DAYJS_LOCALE_MAPPING = { 'hr-HR': 'hr', 'uk-UA': 'uk', 'lt-LT': 'lt', + 'bg-BG': 'bg', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -50,6 +51,7 @@ 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'), } as Record Promise> export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {