Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/30603-i18n-skill-locale-ladder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@objectstack/skills': patch
---

docs(skills): objectstack-i18n teaches the five-step locale ladder that `resolveLocaleAmong` runs (exact, case-insensitive, same platform-table language, base language, first registered variant), so a `zh-TW` request is taught to reach a registered `zh-Hant` bundle rather than the first `zh-*` one

Clause-②: no
Metadata-protocol: none
6 changes: 4 additions & 2 deletions skills/objectstack-i18n/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,10 @@ registers when no i18n plugin is present):
plugins can each contribute their own `objects.*` slice
- **`getLocales()`** / **`setSupportedLocales()`** / **`getDefaultLocale()`** / **`setDefaultLocale()`**

The in-memory fallback additionally resolves locale codes
(exact → case-insensitive → base language `zh-CN` → `zh` → variant `zh` → `zh-CN`).
The in-memory fallback additionally resolves locale codes through `resolveLocaleAmong`
(`@objectstack/spec/system`), the one ladder `resolveBundleLocale` also runs: exact →
case-insensitive → same platform-table language (`zh-TW` → `zh-Hant`) → base language
`zh-CN` → `zh` → first registered variant `zh` → `zh-CN`.

The contract also declares optional methods — `getFieldLabels`, `getCoverage`,
`suggestTranslations` — that **no shipped implementation provides**. Treat them
Expand Down
Loading