From 8abc6b9a7cf09d3e5211a98bc3a661aede0b492a Mon Sep 17 00:00:00 2001 From: emergent-agent-e1 Date: Sun, 9 Nov 2025 08:01:27 +0000 Subject: [PATCH] auto-commit for 72ee9f7a-4a66-4c84-b1e0-0aa15db36009 --- frontend/src/config/i18n.ts | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/frontend/src/config/i18n.ts b/frontend/src/config/i18n.ts index acc69c70..65eb6974 100644 --- a/frontend/src/config/i18n.ts +++ b/frontend/src/config/i18n.ts @@ -97,23 +97,10 @@ const i18n = new I18n({ }, }); -// Set default locale -i18n.enableFallback = true; +// Configure i18n with safe defaults i18n.defaultLocale = 'en'; - -// Get device locale safely (handle web platform where it might be undefined) -const getDeviceLocale = () => { - try { - const locale = Localization.getLocales?.()?.[0]?.languageCode || - Localization.locale || - 'en'; - return typeof locale === 'string' ? locale.split('-')[0] : 'en'; - } catch (error) { - return 'en'; - } -}; - -i18n.locale = getDeviceLocale(); +i18n.locale = 'en'; // Start with safe default +i18n.enableFallback = true; export const loadSavedLanguage = async () => { try {