Skip to content

Docs ships seven locales and the marketing site ships eight — zh-Hant is the missing one, and docs already has a comment waiting for it #172

Description

@hotlong

Blocked-by: #169

The reading

apps/docs/lib/i18n.ts:17 declares seven locales: en, zh-Hans, ja, de, es, fr, ko.

apps/docs/middleware.ts:30-33 maps Traditional Chinese browsers onto Simplified, with this comment:

Traditional variants fall back to Simplified until zh-Hant ships

So zh-TW and zh-HK readers are served Simplified today, by an explicitly temporary arrangement.

Meanwhile the marketing site — objectstack-ai/www.objectos.ai, which the maintainer attached to this session — ships eight locales including zh-Hant (src/lib/i18n.ts:3-5), and generates the Traditional set mechanically from the Simplified one. Its AGENTS.md documents the pipeline:

zh-Hant content is generated from zh-Hans with pnpm gen:zh-hant; do not hand-edit generated Traditional Chinese files

and its converter lives at src/lib/zhconvert.ts.

The condition that comment in middleware.ts is waiting on has therefore already been met next door. The generation path exists, is in production, and is owned by the same team.

Why this is a keyword card and not just a parity card

www.objectos.ai/AGENTS.md states as standing policy:

Localize for reach. Long-tail search and model coverage in ja/ko/de/es/fr is cheap reach that English-only competitors miss.

Traditional Chinese is the same trade, for Taiwan and Hong Kong, and it is cheaper here than any other locale on the list because it is derived rather than authored. Simplified and Traditional are not interchangeable in search: the query strings differ character-by-character, so a Simplified page does not rank for a Traditional query however good it is.

Why this is blocked on #169

#169 is rewriting how the locale surface is derived — sitemap entries and hreflang alternates will be emitted per real translated file rather than for all seven locales unconditionally. Adding an eighth locale before that lands would collide in lib/i18n.ts, lib/seo.ts and app/sitemap.ts, and would add an eighth row to exactly the over-advertisement problem #169 exists to fix. Do this after.

Known trap for whoever picks this up

Docs' Simplified coverage is 62 of 79 pages, not complete. Generating Traditional from Simplified inherits that gap exactly — you would ship zh-Hant at 62/79 on day one. That is acceptable if and only if #169 has already landed, because then the missing 17 simply are not advertised. Verify #169's behaviour is in place before generating, rather than assuming it.

Also confirm before starting: whether the docs site wants a generated-and-committed Traditional set (www's model) or on-the-fly conversion. www commits the generated files and gates hand-editing; copying that model is the low-surprise choice, but it roughly doubles the Chinese file count in content/docs.

Verification

  • zh-TW and zh-HK browsers reach a Traditional path rather than being remapped to Simplified, and the legacy mapping in middleware.ts:30-33 is updated rather than left contradicting the new state.
  • The temporary comment quoted above is removed once it is no longer true.
  • Traditional pages declare the correct language (this depends on Every page in all seven locales declares lang="en" on the root html element #168 landing — check it has).

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions