Development notes
No translation should mean no fake language page
How different routing rules for fixed pages and notes preserve empty states, link only to real translations, and avoid fake pages for missing language versions.
- Multilingual content
- Astro
- Translation
- Content engineering
The easily overlooked question on a multilingual website is not whether a translation exists, but whether the site should pretend it does when it doesn’t.
Fixed pages can usually have Traditional Chinese, English, and Japanese versions ready at build time. An article, however, may have only a Traditional Chinese draft or a single published Chinese version. If both follow the same rule of generating a page for every language in the language list, the site ends up with a fake page: the URL exists, but the content does not.
This website takes a different approach. Fixed pages can have a complete set of language entry points, while notes get a page in another language only when an actual translation file exists and qualifies for publication. The guiding judgment is this: an empty language entry point can honestly exist; a fake translated article should not be generated.
Fixed pages and notes use different data sources
The home, about, work, collaboration, products, and notes index pages are fixed pages. Their set of languages is part of the site configuration. The English and Japanese fixed pages have their own route props and translated copy at build time.
Notes come from a Content Collection. Each Markdown article has its own locale, stableId, slug, and publication status. Article routes do not blindly expand the language list. They first retrieve the articles that currently qualify for public output, then generate paths from those articles’ data.
These are two different data flows:
Fixed pages: language set → fixed routes → corresponding copy
Articles: actual Markdown → publication filtering → actual article routes
The language set for fixed pages describes which interface languages the site supports. Article data describes which pieces of content actually exist at a given time. The two sets can have different sizes without contradicting each other.
stableId identifies translations of the same content
Versions of the same article can share a stableId across languages, but each language still has its own slug, title, description, and body. When an article page creates its language-switching links, it looks for other language versions with the same stableId in the current collection of published articles.
This lookup has two restrictions, both useful:
- A file without the matching
stableIdis not treated as a translation. - Even if the file exists, it does not appear among a published article’s translation links while it is still a draft or its publication date has not arrived.
A published Traditional Chinese article can therefore have only a Traditional Chinese URL. Once its English version is complete, has been proofread, and qualifies for publication, the English URL joins the same group of language-alternate links.
The language menu should not link to nonexistent articles
The language menu on fixed pages can list all three languages because each has a corresponding fixed-page route. On article pages, languageLinks comes from the actual set of translations. If an article does not exist in a language, the menu shows that version as unavailable rather than creating a fake link that returns to the home page, displays the original text, or produces a 404.
For readers, the distinction is clear:
- When a translation exists, provide a real link to it.
- When no translation exists, say that the language version is currently unavailable.
- Do not copy the original text to a URL for another language and pass it off as translated content.
- Do not silently send readers to another language and leave them thinking the switch succeeded.
The language menu presents the state of the data. It does not fill in missing content for the content team.
An empty state is more honest than a fake article
When the original Traditional Chinese article was written on October 2, 2026, the English and Japanese notes indexes had no published articles. They still had their own /en/notes and /ja/notes routes. The indexes showed an empty state so readers could see that the language entry point existed but its content was not ready. That describes the state recorded in the original article, not the current publication state: English and Japanese translations, including this article, have since been added.
Copying Traditional Chinese articles into the English or Japanese index just to make the page look complete would cause several problems:
- The URL would look like a translated article, but the body would not be in the target language.
- Search engines might receive several pages with different URLs but identical content.
- Switching languages would lead readers to believe the translation was complete.
- When a real translation was later added, the identity and links of the existing fake page would become difficult to untangle.
An empty state offers less content, but it makes the situation clear. For a content site, that is easier to maintain than hiding the gap behind an apparently complete article card.
The sitemap must respect the same boundary
Keeping fake translation pages out of the language menu is not enough. They must also be absent from every other entry point in the public output. Article paths in the sitemap are generated from the collection of published articles, so a language without a translation does not get an article URL.
The same rule applies to:
- The latest-articles section on the home page.
- The notes index for each language.
- Pagination routes.
- Article-page canonical URLs.
hreflangalternate links.- Related articles and further reading.
If any one of these entry points adds a nonexistent translation back in, the site presents conflicting content states. Whether a translation exists should be determined where content data enters the system, rather than left for each page to guess.
A page in a language is not the same as content in that language
The site’s design allows both of these to be true at once:
/en/aboutand/ja/aboutare readable fixed pages./en/notes/some-articleand/ja/notes/some-articlemay not exist.
The first means the site interface is available in English and Japanese. The second means a particular article’s translation is not yet available. This is not an inconsistency; it separates two different data responsibilities.
If every article needs to be translated in the future, language files with the same stableId can be added one article at a time. Each version can then enter the public collection according to its proofreading and publication status. The site does not need to create empty article pages in advance for future translations.
What to check before adding a translation
- Confirm that this is a translation of an existing article, not a new article with a similar title.
- Keep the same
stableId, and write a naturalslug, title, description, and body for the target language. - Confirm that the target-language file’s
localematches its directory. - Keep the article at
draft: trueuntil proofreading and confirmation of what may be made public are complete. - Verify that the article page, language menu, canonical URL,
hreflang, and sitemap all reflect the new state together. - When there is no translation, keep the empty state rather than creating a placeholder article first.
The number of routes should not create an illusion of complete multilingual content. Having fixed pages in three languages does not mean every note also exists in three languages. An article with only one language version does not mean the site’s multilingual architecture has failed, either. If each URL honestly describes the content it provides, readers do not have to guess whether they are looking at unfinished work.
Scope of this record
This article documents the content boundaries between fixed pages, the article Content Collection, language switching, empty states, canonical URLs, hreflang, and the sitemap as recorded in the original Traditional Chinese article on October 2, 2026. It does not claim that the translation workflow was automated. Nor does it treat the English or Japanese empty states recorded at that time as measurements of translation progress or reader demand. Those empty states are historical context, not a claim that the indexes remain empty now that translations have been added.