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.
This commit is contained in:
Martin Lindvik
2026-02-17 15:32:01 +01:00
committed by GitHub
parent 7b7b883139
commit e3695c17c6
3 changed files with 4 additions and 0 deletions

View File

@@ -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

View File

@@ -32,6 +32,7 @@ export const DAYJS_LOCALE_MAPPING = {
'tr-tr': 'tr',
'fi-fi': 'fi',
'he-il': 'he',
'sv-se': 'sv',
} as Record<SupportedLocale, ISOLanguage>
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<SupportedLocale, () => Promise<ILocale>>
export async function loadDayJsLocale(language: SupportedLocale) {

View File

@@ -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
}