mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
feat: use friendly language names for Comfy.Locale setting options (#1828)
This commit is contained in:
16
README.md
16
README.md
@@ -487,10 +487,10 @@ Our project supports multiple languages using `vue-i18n`. This allows users arou
|
|||||||
|
|
||||||
### Supported Languages
|
### Supported Languages
|
||||||
|
|
||||||
- en
|
- en (English)
|
||||||
- zh
|
- zh (中文)
|
||||||
- ru
|
- ru (Русский)
|
||||||
- ja
|
- ja (日本語)
|
||||||
|
|
||||||
### How to Add a New Language
|
### How to Add a New Language
|
||||||
|
|
||||||
@@ -540,7 +540,13 @@ Add the newly added language to the following item in `src/constants/coreSetting
|
|||||||
id: 'Comfy.Locale',
|
id: 'Comfy.Locale',
|
||||||
name: 'Locale',
|
name: 'Locale',
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
options: ['en', 'zh', 'ru', 'ja'], // Add the new language(s) here
|
// Add the new language(s) here
|
||||||
|
options: [
|
||||||
|
{ value: 'en', text: 'English' },
|
||||||
|
{ value: 'zh', text: '中文' },
|
||||||
|
{ value: 'ru', text: 'Русский' },
|
||||||
|
{ value: 'ja', text: '日本語' }
|
||||||
|
],
|
||||||
defaultValue: navigator.language.split('-')[0] || 'en'
|
defaultValue: navigator.language.split('-')[0] || 'en'
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -262,7 +262,12 @@ export const CORE_SETTINGS: SettingParams[] = [
|
|||||||
id: 'Comfy.Locale',
|
id: 'Comfy.Locale',
|
||||||
name: 'Language',
|
name: 'Language',
|
||||||
type: 'combo',
|
type: 'combo',
|
||||||
options: ['en', 'zh', 'ru', 'ja'],
|
options: [
|
||||||
|
{ value: 'en', text: 'English' },
|
||||||
|
{ value: 'zh', text: '中文' },
|
||||||
|
{ value: 'ru', text: 'Русский' },
|
||||||
|
{ value: 'ja', text: '日本語' }
|
||||||
|
],
|
||||||
defaultValue: () => navigator.language.split('-')[0] || 'en'
|
defaultValue: () => navigator.language.split('-')[0] || 'en'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user