Source PR: #526 · docs/rfcs/host-locale-subscription.md · @kalininilya
Description
locale.subscribe() pushes the language the host presents its interface in, as a BCP 47 tag, on subscribe and on every change. Products render in that language instead of inferring one.
Motivation
A product cannot tell which language its host is running in. navigator.language reports the operating system's preference, which is wrong whenever the user picked a different language inside the host — the case that setting exists for.
Requirements
language_tag is an open BCP 47 string, not an enum: hosts add languages without a protocol change.
- A product that does not ship the tag it receives picks its own fallback; the host does not negotiate one.
- Emits the current locale immediately on subscribe, then on every change.
- No permission gate and no pairing requirement — products need it on first paint.
LocaleHost is a required Platform trait, so a host serves a real value rather than Unsupported.
Tasks
Source PR: #526 ·
docs/rfcs/host-locale-subscription.md· @kalininilyaDescription
locale.subscribe()pushes the language the host presents its interface in, as a BCP 47 tag, on subscribe and on every change. Products render in that language instead of inferring one.Motivation
A product cannot tell which language its host is running in.
navigator.languagereports the operating system's preference, which is wrong whenever the user picked a different language inside the host — the case that setting exists for.Requirements
language_tagis an open BCP 47 string, not an enum: hosts add languages without a protocol change.LocaleHostis a requiredPlatformtrait, so a host serves a real value rather thanUnsupported.Tasks