electerm / electerm/electerm-web-docker
Use the `Accept-Language header` to switch the language when first opening the web UI of `electerm/electerm-web-docker`
- Dominant language
- Shell
- Stars
- 78
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
- Use the `Accept-Language header` to switch the language when first opening the web UI of `electerm/electerm-web-docker`.
- If a user executes the following command in Ubuntu WSL 26.04,
```bash
docker run -d --name electerm-web-docker \
--init \
-v electerm-web-data:/home/electerm/data \
-e "DB_PATH=/home/electerm/data" \
-e "HOST=0.0.0.0" \
-e "SERVER_SECRET=some_server_secret" \
-e "SERVER_PASS=password_to_login" \
-e "ENABLE_AUTH=1" \
-p 5577:5577 \
--restart unless-stopped \
zxdong262/electerm-web:5.3.0
```
- If I open http://localhost:5577/ through Microsoft Edge with the language set to Simplified Chinese, I will find that the interface is in English. I have to manually switch the language to Simplified Chinese in the settings.
-
-
- If we could check https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Accept-Language to switch languages when the webpage is first opened, it would obviously avoid the embarrassment for some people who don't understand English.
- Some external discussions surrounding browser standards can be found at https://x.com/iseki_zero/status/2091304187896508449?s=20 .
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the provided Docker command and opening http://localhost:5577/ in a browser configured for Simplified Chinese. Read the MDN Accept-Language reference and trace the web UI's initial language selection. Done means the first visit selects the browser's supported language while the existing manual language setting continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- frontend, internationalization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100