mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 22:21:27 -05:00
Set the default language based on the Browser #1370
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RodriMora on GitHub (Jun 25, 2024).
Is your feature request related to a problem? Please describe.
At the moment it defaults to English
Describe the solution you'd like
Use something like js
navigator.languageto set the default Open-webui languageDescribe alternatives you've considered
Use the browser language for the default language for the login page, but if the user changes it, respect it for the duration of the session. I think that would be the best UX
@silentoplayz commented on GitHub (Jun 25, 2024):
Possibly related, but not clear enough for me to make that decision on my own. I will still link the merged PR here for your own viewing: https://github.com/open-webui/open-webui/pull/1313
@RodriMora commented on GitHub (Jun 25, 2024):
I believe at the moment openwebui defaults to english not matter your OS or Browser settings. That's OK for the admin but not for the endusers if planning to deploy it to more people, as if someone doens't know english they probably would have a hard time looking for the setting to change it.
I believe it's better UX to default to the OS/Browser language to ensure the user understands it. But then if the user changes it in the settings, respect that election while he is logged on.
If I have time I'll try to submit a PR.
@tjbck commented on GitHub (Jun 25, 2024):
Are you on the latest version? Language auto detection should be enabled by default:
9e4dd4b86f/src/routes/%2Blayout.svelte (L65)@RodriMora commented on GitHub (Jun 25, 2024):
Hi! thanks for the response. I didn't notice this was already implemented as I just tested manually. This is what I've found with the info you provided.
Yes, latest version. I just checked and


navigator.languagescan output non-default languages-combosThis is in Edge:
This is in Chrome:
It seems like:

navigator.languages[0]in this case would pick "es" which doesn't correspond to any of the list compatible with openwebui
Maybe looping for the output of navigator.languages until there is a match would be a better solution?
@tjbck commented on GitHub (Jun 25, 2024):
Feel free to make a PR!
@tjbck commented on GitHub (Jun 30, 2024):
Should be fixed on dev!
@cyberluke commented on GitHub (Feb 17, 2025):
What if my browser is set to English but in open-webui I choose another language? Shouldn't it take user's language from open-webui settings?