Web UI locale detection can pick a non-English locale even when English is preferred #7181

Open
opened 2026-02-16 18:06:24 -05:00 by yindo · 1 comment
Owner

Originally created by @jaydenireland on GitHub (Jan 22, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

In the OpenCode web UI, the language can incorrectly switch to a non-English locale even when the browser prefers English, because the locale detection logic doesn’t explicitly match en*. If navigator.languages contains en*first (en-US, en-GB, en) but also contains another supported locale later (fr/de/es/etc), the UI can end up using that later locale instead of English.

For example: navigator.languages returns ['en', 'fr'] for me but the UI is still in French even though English is my top language.

Plugins

N/A

OpenCode version

1.1.31

Steps to reproduce

  1. Ensure the browser language preference list includes English first, but also includes another supported locale later (ru/fr/de/etc). ( chrome://settings -> Preferred languages)
  2. Open the OpenCode web UI.
  3. Observe the UI language.

Screenshot and/or share link

Image

Image

Operating System

macOS 26.2

Terminal

N/A

Originally created by @jaydenireland on GitHub (Jan 22, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description In the OpenCode web UI, the language can incorrectly switch to a non-English locale even when the browser prefers English, because the locale detection logic doesn’t explicitly match en*. If navigator.languages contains en*first (en-US, en-GB, en) but also contains another supported locale later (fr/de/es/etc), the UI can end up using that later locale instead of English. For example: navigator.languages returns ['en', 'fr'] for me but the UI is still in French even though English is my top language. ### Plugins N/A ### OpenCode version 1.1.31 ### Steps to reproduce 1. Ensure the browser language preference list includes English first, but also includes another supported locale later (ru/fr/de/etc). ( chrome://settings -> Preferred languages) 2. Open the OpenCode web UI. 3. Observe the UI language. ### Screenshot and/or share link ![Image](https://github.com/user-attachments/assets/adb1e775-6b68-42a1-900d-7748c0ddb368) ![Image](https://github.com/user-attachments/assets/a4b188ac-de74-45e2-96d6-9c931067bb10) ### Operating System macOS 26.2 ### Terminal N/A
yindo added the bugweb labels 2026-02-16 18:06:24 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9967: Language setting for communicating with AI should be consistent with interface language
  • #7170: i18n support (broader internationalization infrastructure)
  • #6391: TypeError with localeCompare in sort operations (language-aware string comparison)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #9967: Language setting for communicating with AI should be consistent with interface language - #7170: i18n support (broader internationalization infrastructure) - #6391: TypeError with localeCompare in sort operations (language-aware string comparison) Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7181