From e3695c17c66b4ea728244fd48ae16de22043f0de Mon Sep 17 00:00:00 2001 From: Martin Lindvik <54244741+mratingittar@users.noreply.github.com> Date: Tue, 17 Feb 2026 15:32:01 +0100 Subject: [PATCH] feat: add Swedish for language selection (#2248) The Swedish translations were finished on crowdin recently but I noticed that the language selection was still missing so I went ahead and added it. --- frontend/src/i18n/index.ts | 1 + frontend/src/i18n/useDayjsLanguageSync.ts | 2 ++ pkg/i18n/i18n.go | 1 + 3 files changed, 4 insertions(+) diff --git a/frontend/src/i18n/index.ts b/frontend/src/i18n/index.ts index 82adbe600..0990ca5df 100644 --- a/frontend/src/i18n/index.ts +++ b/frontend/src/i18n/index.ts @@ -40,6 +40,7 @@ export const SUPPORTED_LOCALES = { 'tr-TR': 'Türkçe', 'fi-FI': 'Suomi', 'he-IL': 'עִבְרִית', + 'sv-SE': 'Svenska', // IMPORTANT: Also add new languages to useDayjsLanguageSync // IMPORTANT: Also add new languages to pkg/i18n/i18n.go } as const diff --git a/frontend/src/i18n/useDayjsLanguageSync.ts b/frontend/src/i18n/useDayjsLanguageSync.ts index fa4c0e461..a2c862fbb 100644 --- a/frontend/src/i18n/useDayjsLanguageSync.ts +++ b/frontend/src/i18n/useDayjsLanguageSync.ts @@ -32,6 +32,7 @@ export const DAYJS_LOCALE_MAPPING = { 'tr-tr': 'tr', 'fi-fi': 'fi', 'he-il': 'he', + 'sv-se': 'sv', } as Record export const DAYJS_LANGUAGE_IMPORTS = { @@ -63,6 +64,7 @@ export const DAYJS_LANGUAGE_IMPORTS = { 'tr-tr': () => import('dayjs/locale/tr'), 'fi-fi': () => import('dayjs/locale/fi'), 'he-il': () => import('dayjs/locale/he'), + 'sv-se': () => import('dayjs/locale/sv'), } as Record Promise> export async function loadDayJsLocale(language: SupportedLocale) { diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go index a5475b8b5..dea187bf7 100644 --- a/pkg/i18n/i18n.go +++ b/pkg/i18n/i18n.go @@ -76,6 +76,7 @@ var availableLanguages = map[string]bool{ "tr-TR": true, "fi-FI": true, "he-IL": true, + "sv-SE": true, // IMPORTANT: Also add new languages to the frontend }