mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-25 20:20:08 +08:00
fix(i18n): default to English regardless of browser locale (#13324)
Previously, on first load with no saved language preference, the app used navigator.language as the fallback, causing users with Portuguese (pt-PT / pt-BR) or other non-English browser locales to see the UI in that language automatically. The expected behavior is that English is always the default; users can change the language explicitly via settings. Co-authored-by: Antônio Alexandre Borges Lima <104531655+AntonioABLima@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2dc9e194ed
commit
2e41b7f3e2
@ -41,7 +41,7 @@ const normalizeLanguage = (lang?: string | null): string => {
|
||||
};
|
||||
|
||||
export const detectedLang = normalizeLanguage(
|
||||
localStorage.getItem("languagePreference") || navigator.language,
|
||||
localStorage.getItem("languagePreference") || "en",
|
||||
);
|
||||
|
||||
const i18n = i18next.createInstance();
|
||||
|
||||
Reference in New Issue
Block a user