Skip to content

Commit ad028b5

Browse files
Merge pull request #6 from Comfy-Org/fix-locale-cascade
Fix localization language selection: Use navigator for client-only config
2 parents 15b282c + 06468aa commit ad028b5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ui/src/utils/i18n.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ void i18n
7474
// Always enable debug mode to see what's happening
7575
debug: true,
7676

77-
// Default language
78-
lng: 'en',
79-
8077
// Fallback language
8178
fallbackLng: 'en',
8279

@@ -93,6 +90,14 @@ void i18n
9390
console.log(`Missing translation: [${lng}] ${ns}:${key}`)
9491
},
9592

93+
// Language detection configuration
94+
detection: {
95+
// Order of detection methods
96+
order: ['navigator', 'htmlTag', 'path', 'subdomain'],
97+
// Don't cache detected language
98+
caches: []
99+
},
100+
96101
// Backend configuration
97102
backend: {
98103
// Path to load translations from

0 commit comments

Comments
 (0)