mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
fix default language in initLocalizer
This commit is contained in:
@@ -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: '🇷🇺',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user