Files
markusgraf_ch/openspec/changes/add-multilingual-support/proposal.md
T
gurixandClaude c3c747b7fa feat: add multilingual support with German and English
Implement complete multilingual support using Hugo's multilingual mode with German (de) as default and English (en) as secondary language.

Changes:
- Configure Hugo multilingual mode with language-specific parameters
- Reorganize content using language suffix pattern (filename.de.md, filename.en.md)
- Translate all content to English (home page and CV page)
- Implement language switcher that maintains page context
- Add language-specific navigation menus
- Update templates to use language-aware URL functions (relLangURL)
- Fix navbar brand and Home links to respect current language
- Add translationKey to content frontmatter for explicit translation linking

URL Structure:
- German: /de/ (home), /de/cv/ (CV page)
- English: /en/ (home), /en/cv/ (CV page)

Key Implementation Details:
- Use filename.{lang}.md pattern instead of {lang}/filename.md subdirectories
- Always use relLangURL for internal navigation, never .Site.BaseURL
- Menu URLs must include language prefix when defaultContentLanguageInSubdir = true
- Added translationKey to frontmatter for proper translation discovery

Documented 5 critical bugs and their solutions in design.md for future reference.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 23:52:08 +01:00

1.6 KiB

Add Multilingual Support (German/English)

Why

The website is currently German-only, limiting accessibility for international visitors. Adding English language support will make the site more accessible to a global audience of HR professionals, recruiters, and potential collaborators who may not speak German.

What Changes

  • Configure Hugo's multilingual mode with German (de) as default and English (en) as secondary language
  • Restructure content directory to support language-specific content (content/de/ and content/en/)
  • Translate all existing German content to English (home page, CV page, navigation, footer)
  • Add language switcher UI component in navigation that maintains current page context
  • Implement browser language detection to automatically select appropriate language for new visitors
  • Preserve language preference across page navigation using URL-based language routing (/de/ and /en/ paths)
  • Update templates to support language-specific strings and navigation

Impact

  • Affected specs: internationalization (new capability)
  • Affected code:
    • /hugo.toml (multilingual configuration)
    • /content/ directory structure (reorganize to language-specific subdirectories)
    • /layouts/partials/nav.html (add language switcher)
    • /layouts/partials/header.html (update if needed)
    • All content files (duplicate and translate to English)
  • User-facing: Language switcher in navigation, English version of all content, automatic language detection
  • BREAKING: Content file paths change from /content/*.md to /content/{de,en}/*.md