diff --git a/web/assets/js/langs.js b/web/assets/js/langs.js index c6e4329f..77c2c287 100644 --- a/web/assets/js/langs.js +++ b/web/assets/js/langs.js @@ -6,7 +6,7 @@ const supportLangs = [ }, { name: 'فارسی', - value: 'fa_IR', + value: 'fa-IR', icon: '🇮🇷', }, { @@ -16,7 +16,7 @@ const supportLangs = [ }, { name: 'Русский', - value: 'ru_RU', + value: 'ru-RU', icon: '🇷🇺', }, ]; diff --git a/web/html/login.html b/web/html/login.html index 68b38624..3ec410c6 100644 --- a/web/html/login.html +++ b/web/html/login.html @@ -86,7 +86,7 @@ - +    diff --git a/web/locale/locale.go b/web/locale/locale.go index 9a4357c3..4a5f5c6e 100644 --- a/web/locale/locale.go +++ b/web/locale/locale.go @@ -29,7 +29,7 @@ type SettingService interface { func InitLocalizer(i18nFS embed.FS, settingService SettingService) error { // set default bundle to english - i18nBundle = i18n.NewBundle(language.English) + i18nBundle = i18n.NewBundle(language.MustParse("en-US")) i18nBundle.RegisterUnmarshalFunc("toml", toml.Unmarshal) // parse files