feat(i18n): make site bilingual (DE + EN) via Craft multi-site #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/multilingual-en"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Was
Die ganze Seite ist jetzt zweisprachig (DE + EN) — natives Craft-5-Multi-Site, kein Plugin. Englisch lebt unter
/en/, Deutsch bleibt auf Root.Schichten (4 Commits)
chore(docker)—icu-data-fullin alle 3 Dockerfiles. Root-Cause:php:8.3-fpm-alpinebringt nuricu-data-en, dadurch rendert der Craft-Formatter jedes Datum englisch. Jetzt lokalisiert ICU korrekt.feat(i18n)EN-Site — zweite Siteen(baseUrl: $EN_SITE_URL) im bestehenden Site-Group, alle 4 Sections + Category/Tag-Groups für beide Sites aktiv.EN_SITE_URLin.env+ allen getrackten env-Templates (from-scratch reproduzierbar). Das/en-Präfix kommt aus der baseUrl, nicht aus den URI-Formaten.feat(i18n)Felder —translationMethod: none→sitefür die Prosa-Felder (articleLead,articleTldr,articleBody,articleFootnotes,articleHeroCaption,articleStats,seo). Referenz-Felder bleiben sprachneutral. DE-Werte seeden die EN-Variante.feat(i18n)Templates — statische DE-Strings →translations/{de,en}/site.php+|t('site'); hreflang + x-default inseo.twig; Language-Switcher inheader.twig(Fallback auf Site-Home statt 404); locale-aware Datum; dynamische Blog-URL/Feed-Sprache.Verifikation (lokal, alle grün)
/,/en/,/blog,/en/blog, Artikel DE+EN → alle 200x-defaultauf beiden SitesHinweis zur Config-Diff
Einige
config/project/-YAMLs (entryTypes, einzelne fields) wurden von Crafts project-config-Writer kosmetisch re-quotet (kein semantischer Change) — Craft-5.8.19-Serializer-Normalisierung.Noch offen (kein Code, separater Schritt)
EN-Inhalte sind aktuell mit DE-Text geseedet. Redaktionelle Übersetzung der Globals/Singles/Unterseiten/Blog folgt im CP. Prod-Deploy braucht
EN_SITE_URLin der prod-.env+ Image-Rebuild füricu-data-full.Closes #4
🤖 Generated with Claude Code
Make the front-end fully bilingual: - extract hardcoded German UI strings into translations/{de,en}/site.php and render them via |t('site') (404, footnotes, progress, marginalia, category nav, related, blog pagination + empty states) - emit hreflang alternates + x-default for every URL-enabled site in _system/seo.twig - add a language switcher (langSwitcher.twig) in the header that links to the current page in the other language, falling back to the site home when no localized variant exists - format dates locale-aware via the Craft formatter (de "19. Mai 2026", en "May 19, 2026") in blog meta and card - derive blog URLs and the feed language dynamically so the EN baseUrl and language resolve correctly Closes #4