-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use navigator.languages
instead of navigator.language
for language detection
#4243
Comments
What do you mean by "for editing"? you have found the correct folder for editing the database |
I need to change some status page data, but I can't find its source code. I already asked a question about changing the language on the status page. Now I need to find a file where I can edit the default language for site visitors. |
First of all, it seems like you are using docker. A default language and locale switcher is included in #3523 and said PR will be reviewed in the v2.1 release train. See #1643 Localising the footer/.. is tracked here: #2784 Our contibution guide (including how to get a dev environment set up) is here: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md |
I have "Ukrainian" in my OS settings, but by default it displays in English. |
The default language is determined like this: Lines 60 to 63 in 8151ac0
Could you run the following commands in the console with uptime open? localStorage.locale navigator.language |
The problem is that I can't find where this file is located: uptime-kuma/src/i18n.js
How exactly should I execute these commands through the console? |
I managed to find 3 i18n.js files at the following address: |
navigator.languages
instead of navigator.language
for language detection
The reason for this is that we currently only support the I think a better approach compared to the current one would be to use the following instead: Docs: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages |
Okay, I understand what the problem is. Thank you very much! |
Closing as #4244 was merged |
🛡️ Security Policy
📝 Describe your problem (edited by @chaflying)
Language key
uk
is not recognized by the front-end, and the displayed language defaults back toen
.📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23.10
💻 Operating System and Arch
Ubuntu 22.04.3 LTS
🌐 Browser
N/A
🐋 Docker Version
24.0.7
🟩 NodeJS Version
N/A
The text was updated successfully, but these errors were encountered: