Pages
Markdown pages
A page written in markdown has a copy in each language, translated whole. Here are this site's, and what it takes, with the lines that do it.
This site's pages
| en-US | The tour | the original |
| ar-EG | جولة | translatedFrom: 379ae94ae71a |
| th-TH | ทัวร์ | translatedFrom: 379ae94ae71a |
What it takes
A copy per language
A page is written once under pages/ and the source language, and each language has its copy at the same path under its own folder, translated whole: headings, text, and the title and description in its frontmatter.
title: The tourtitle: جولةOut of date, reported
Each copy records the version of the original it was translated from. When the original changes, vp dev reports the copy as out of date and translates it again, and vp build fails on it, as the column above would show.
export const TRANSLATED_FROM = "translatedFrom";Dates and numbers for each reader
A date or a number in a page isn't written out: it's an island that formats it with Intl for the reader. Each island goes on a line of its own, since the page's HTML is cut at each one.
import Fmt from "../../../src/docs/Fmt.tsx" with { island: "load" }<Fmt num="1234567.891" />Links stay in the language
Links to the site's own pages are written relative, never with the language in them, so every copy's links stay in its own language.
Back to [every time, twice](./tour.md#times), or [see the upcoming events](../events).Used here, and explained on the Components page: langAttrs and useLocales.
The full reference is in void-fbtee's skill.