pub fn default_locale() -> StringExpand description
Resolve a default BCP-47 locale: the OS locale first (sys-locale already
returns BCP-47, e.g. zh-Hant-TW), then the LANG environment variable
(POSIX form zh_TW.UTF-8 → zh-TW), then en-US.
OS-first matters because this is also the serde default for
AgentProfile.locale: under launchd there is no LANG, so the old
LANG-only resolution silently defaulted every headless agent to en-US
even on a non-English system.