Skip to content

Commit

Permalink
feat: use friendly language names for Comfy.Locale setting options (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shinshin86 authored Dec 7, 2024
1 parent 6409e17 commit 6eb5ee9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,10 +487,10 @@ Our project supports multiple languages using `vue-i18n`. This allows users arou

### Supported Languages

- en
- zh
- ru
- ja
- en (English)
- zh (中文)
- ru (Русский)
- ja (日本語)

### How to Add a New Language

Expand Down Expand Up @@ -540,7 +540,13 @@ Add the newly added language to the following item in `src/constants/coreSetting
id: 'Comfy.Locale',
name: 'Locale',
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'
},
```
Expand Down
7 changes: 6 additions & 1 deletion src/constants/coreSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,12 @@ export const CORE_SETTINGS: SettingParams[] = [
id: 'Comfy.Locale',
name: 'Language',
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'
},
{
Expand Down

0 comments on commit 6eb5ee9

Please sign in to comment.