@@ -151,7 +151,7 @@ import {
151151 setRestartAfterPendingUpdate ,
152152} from ' @/helpers/utils.js'
153153import { start_join_server , start_join_singleplayer_world } from ' @/helpers/worlds.ts'
154- import i18n , { setLocale } from ' @/i18n.config'
154+ import i18n , { detectSystemLocale , setLocale } from ' @/i18n.config'
155155import {
156156 instanceKeys ,
157157 instanceListQueryOptions ,
@@ -703,10 +703,7 @@ async function setupApp() {
703703 pending_update_toast_for_version,
704704 } = await traceStartupStep('Read startup settings', getSettings)
705705
706- // Initialize locale from saved settings
707- if (locale) {
708- await traceStartupStep('Apply startup locale', () => setLocale(locale))
709- }
706+ await traceStartupStep('Apply startup locale', () => setLocale(locale || detectSystemLocale()))
710707
711708 Object.assign(appSettings.featureFlags, feature_flags)
712709 isMaximized.value = await traceStartupStep('Read window maximized state', () =>
@@ -1009,15 +1006,15 @@ watch(
10091006 if (appTheme.syncAcrossDevices && appTheme.preferred !== selectedTheme) {
10101007 appTheme.preferred = selectedTheme
10111008 }
1012- if (i18n.global.locale.value !== locale) {
1009+ if (locale && i18n.global.locale.value !== locale) {
10131010 await setLocale(locale)
10141011 }
10151012
10161013 if (appTheme.syncAcrossDevices && settings.theme !== selectedTheme) {
10171014 settings.theme = selectedTheme
10181015 settingsChanged = true
10191016 }
1020- if (settings.locale !== locale) {
1017+ if (locale && settings.locale !== locale) {
10211018 settings.locale = locale
10221019 settingsChanged = true
10231020 }
0 commit comments