File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,10 +114,24 @@ async function bootstrapLocale(
114114 // flight, their selection is the source of truth — don't overwrite it.
115115 // Issue #759: on Windows zh-CN systems, the bootstrap was reverting a
116116 // user-selected English back to Chinese on the welcome screen.
117+ // Issue #448: the welcome page language switcher does not change UI language
118+ // because the bootstrap was overwriting the user's selection.
117119 if ( userInteractedRef . current ) {
118120 return ;
119121 }
120122
123+ // If the user has manually selected a language via localStorage, use that
124+ // as the source of truth and don't overwrite it with the server value.
125+ try {
126+ const manualSelection = localStorage . getItem ( STORAGE_KEY ) ;
127+ if ( manualSelection === "en" || manualSelection === "zh" ) {
128+ // User has manually selected a language, respect their choice
129+ return ;
130+ }
131+ } catch {
132+ /* ignore */
133+ }
134+
121135 if ( storedLocale === "en" || storedLocale === "zh-CN" ) {
122136 const nextLocale = storedLocale === "zh-CN" ? "zh" : "en" ;
123137 await i18n . changeLanguage ( nextLocale ) ;
You can’t perform that action at this time.
0 commit comments