Skip to content

Shell: stamp <html lang> from the Region & Language store - #6972

Merged
delchev merged 1 commit into
masterfrom
fix-shell-html-lang
Aug 27, 2026
Merged

Shell: stamp <html lang> from the Region & Language store#6972
delchev merged 1 commit into
masterfrom
fix-shell-html-lang

Conversation

@delchev

@delchev delchev commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #6971 — the store switched the i18n catalogs and the Accept-Language header but never set document.documentElement.lang, so Harmonia's locale-driven widgets (date/datetime/month pickers, x-h-date-format) resolved to navigator.language and rendered dates in the browser's locale regardless of the chosen language.

Stamps at store init (before Alpine components mount), re-stamps after the platform supported-set fetch corrects the value; set() reloads the page so init covers the change path. Guarded for non-browser contexts.

Related design note kept in the issue: pickers are locale-driven while list columns follow the instance's configured date PATTERN — with the stamp they now at least follow the same app language; pattern-driven pickers stay a separate ask.

🤖 Generated with Claude Code

The store switched i18n catalogs and Accept-Language but never set
document.documentElement.lang, so Harmonia's locale-driven widgets
(date/datetime/month pickers, x-h-date-format) always fell back to
navigator.language - dates rendered in the BROWSER's locale (MM/DD/YYYY
on an en-US Chrome) whatever language the user chose. Stamp at store
init (before components mount) and re-stamp after the supported-set
fetch corrects the value; set() reloads, so init covers it.

Fixes #6971

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@delchev
delchev merged commit aca9379 into master Aug 27, 2026
10 checks passed
@delchev
delchev deleted the fix-shell-html-lang branch August 27, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shell never stamps <html lang>, so Harmonia date/time pickers always format per the browser locale, ignoring Region & Language

1 participant