Commit Graph
2 Commits
Author SHA1 Message Date
oliver 06beab403d lang.js: remember the language a switcher click picked
The switcher links were plain anchors: clicking one navigated but stored nothing, so
the auto-detect on the EN homepage bounced the visitor straight back. A de-DE browser
on /de/ that clicked EN landed on / and was replaced back to /de/ — the 'an explicit
choice always wins' promise in the plan and in llms.txt was only true for ?lang=.

A click now calls remember() with the link's own hreflang, so the choice is stored in
localStorage + the o4p_lang cookie and survives the next session. Selector tests
27 -> 31 (switcher click stores EN, sets the cookie, stores DE, chosen EN survives a
new session).
2026-10-24 21:25:33 +00:00
oliver 937dbd4dbf Publish German and Spanish homepage (/de/, /es/) with hreflang cluster and language switcher
Homepage pilot of the website i18n project. Adds the translated homepage for DE and
ES, the shared selector at /static/lang.js, and the hreflang cluster on all three
language versions (EN included, or the cluster is asymmetric and ignored).

- de/index.html, es/index.html: translator output plus the i18n build (html lang,
  self-referencing canonical, hreflang cluster, lang.js tag, switcher slot in the footer).
- index.html: same cluster + lang.js tag + switcher slot; canonical and og:url
  normalised to the lowercase host.
- static/lang.js: the tested selector (client-side language choice, auto-detect on the
  EN homepage only, once per session; a stored choice or ?lang= always wins).
- sitemap.xml: /de/ and /es/ (priority 1.0, lastmod 2026-10-24).
- llms.txt: new '## Languages' section.

Two gaps in the build recipe were closed while building: a mirrored page cannot use
root-relative source paths (style.css, images/* would resolve to /de/style.css -> 404),
so the build now re-points assets at the site root and keeps page links on the EN route
until the language page exists; and og:url is now this page's own URL instead of the
EN one inherited from the source. Not built yet: support.html, odoo-hosting-2027.html,
the blog, the bootcamp page, the legal pages.
2026-10-24 21:22:13 +00:00