mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-07-01 12:32:09 +00:00
fix default language in initLocalizer
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
This commit is contained in:
parent
1328bb5aba
commit
97925eeebe
3 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ const supportLangs = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'فارسی',
|
name: 'فارسی',
|
||||||
value: 'fa_IR',
|
value: 'fa-IR',
|
||||||
icon: '🇮🇷',
|
icon: '🇮🇷',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ const supportLangs = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Русский',
|
name: 'Русский',
|
||||||
value: 'ru_RU',
|
value: 'ru-RU',
|
||||||
icon: '🇷🇺',
|
icon: '🇷🇺',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
<a-row justify="center" class="centered">
|
<a-row justify="center" class="centered">
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-select ref="selectLang" v-model="lang" @change="setLang(lang)" :dropdown-class-name="themeSwitcher.darkCardClass">
|
<a-select ref="selectLang" v-model="lang" @change="setLang(lang)" :dropdown-class-name="themeSwitcher.darkCardClass">
|
||||||
<a-select-option :value="l.value" label="English" v-for="l in supportLangs">
|
<a-select-option :value="l.value" :label="l.value" v-for="l in supportLangs">
|
||||||
<span role="img" aria-label="l.name" v-text="l.icon"></span>
|
<span role="img" aria-label="l.name" v-text="l.icon"></span>
|
||||||
<span v-text="l.name"></span>
|
<span v-text="l.name"></span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
|
|
|
@ -29,7 +29,7 @@ type SettingService interface {
|
||||||
|
|
||||||
func InitLocalizer(i18nFS embed.FS, settingService SettingService) error {
|
func InitLocalizer(i18nFS embed.FS, settingService SettingService) error {
|
||||||
// set default bundle to english
|
// set default bundle to english
|
||||||
i18nBundle = i18n.NewBundle(language.English)
|
i18nBundle = i18n.NewBundle(language.MustParse("en-US"))
|
||||||
i18nBundle.RegisterUnmarshalFunc("toml", toml.Unmarshal)
|
i18nBundle.RegisterUnmarshalFunc("toml", toml.Unmarshal)
|
||||||
|
|
||||||
// parse files
|
// parse files
|
||||||
|
|
Loading…
Reference in a new issue