Skip to content

feat(docs): add multi-language support with jekyll-polyglot#111

Open
EVWorth wants to merge 5 commits into
andyfase:mainfrom
EVWorth:feat/docs-language_support
Open

feat(docs): add multi-language support with jekyll-polyglot#111
EVWorth wants to merge 5 commits into
andyfase:mainfrom
EVWorth:feat/docs-language_support

Conversation

@EVWorth

@EVWorth EVWorth commented Apr 2, 2026

Copy link
Copy Markdown

Summary

Adds internationalization infrastructure to the documentation site using jekyll-polyglot. When a user switches languages via the header dropdown, the entire site transforms — sidebar navigation, page titles, and content all render in the selected language.

Changes

Infrastructure:

  • Switch from github-pages gem to Jekyll 4 + jekyll-polyglot (required since Polyglot is not a whitelisted GitHub Pages plugin)
  • Update GitHub Actions workflow (docs.yml) for custom Jekyll build with Ruby setup and bundler cache
  • SHA-pin all Actions for supply chain security
  • Add language dropdown selector in _includes/header_custom.html
  • Add lang: en frontmatter to all 10 English pages
  • Configure Polyglot in _config.yml (languages: en/fr, exclude assets from localization)

French translations (10 pages):

How it works

  • Polyglot builds the site once per language into separate subfolders (/ for English, /fr/ for French)
  • Pages are matched across languages by permalink
  • Internal links are automatically relativized (French pages link to French pages)
  • Missing translations fall back to English

Adding more languages

  1. Create a docs/<lang>/ directory mirroring the English structure
  2. Add lang: <code> and matching permalink: frontmatter to each page
  3. Add the language code to languages: in _config.yml
  4. Update the dropdown labels in header_custom.html

Closes the language support request from PR #83.

Add internationalization infrastructure using jekyll-polyglot to support
multiple languages. The entire site (sidebar, titles, content) transforms
when switching languages via the header dropdown.

Infrastructure:
- Switch from github-pages gem to Jekyll 4 + jekyll-polyglot
- Update GitHub Actions workflow for custom Jekyll build
- Add language dropdown switcher in header_custom.html
- Add language switcher CSS to custom.scss
- Add lang: en frontmatter to all English pages

French translations:
- 10 French pages mirroring English structure in docs/fr/
- Translations sourced from community PRs andyfase#76-andyfase#84
- Matched permalinks for Polyglot language pairing

Config:
- languages: en, fr (English default)
- exclude_from_localization: assets, CNAME
- parallel_localization disabled for compatibility
Copilot AI review requested due to automatic review settings April 2, 2026 03:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds multilingual (EN/FR) support to the Jekyll documentation site using jekyll-polyglot, along with a custom GitHub Pages build workflow (since Polyglot isn’t a whitelisted Pages plugin) and a new French documentation tree mirroring the English structure.

Changes:

  • Switch docs site to a custom Jekyll 4 build with Polyglot and update the Pages workflow accordingly.
  • Add a header language dropdown and supporting styles.
  • Add lang frontmatter to English pages and introduce French translations under docs/fr/ with matching permalinks.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/docs.yml Builds/deploys docs via custom Ruby/Jekyll pipeline for non-whitelisted plugins.
docs/Gemfile Moves off github-pages to Jekyll 4 + Polyglot/plugin gems.
docs/_config.yml Enables Polyglot + language configuration for the docs site.
docs/_includes/header_custom.html Adds language selector dropdown to the site header.
docs/_sass/custom/custom.scss Styles the language selector.
docs/index.md Adds lang: en to the homepage.
docs/pages/automations.md Adds lang: en frontmatter for Polyglot.
docs/pages/control-center.md Adds lang: en frontmatter for Polyglot.
docs/pages/faq.md Adds lang: en frontmatter for Polyglot.
docs/pages/features.md Adds lang: en frontmatter for Polyglot.
docs/pages/install.md Adds lang: en frontmatter for Polyglot.
docs/pages/multi-car.md Adds lang: en frontmatter for Polyglot.
docs/pages/region.md Adds lang: en frontmatter for Polyglot.
docs/pages/siri.md Adds lang: en frontmatter for Polyglot.
docs/pages/widgets.md Adds lang: en frontmatter for Polyglot.
docs/fr/index.md Adds French homepage variant for Polyglot build.
docs/fr/pages/automations.md Adds French translation for Automations page.
docs/fr/pages/control-center.md Adds French translation for Control Center page.
docs/fr/pages/faq.md Adds French translation for FAQ page.
docs/fr/pages/features.md Adds French translation for Features page.
docs/fr/pages/install.md Adds French translation for Installation page.
docs/fr/pages/multi-car.md Adds French translation for Multi-car page.
docs/fr/pages/region.md Adds French translation for Region/Support page.
docs/fr/pages/siri.md Adds French translation for Siri/Shortcuts page.
docs/fr/pages/widgets.md Adds French translation for Widgets page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/_config.yml
Comment thread docs/_config.yml Outdated
Comment thread docs/_includes/header_custom.html Outdated
Comment thread docs/_includes/header_custom.html
Comment thread docs/fr/index.md Outdated
Comment thread docs/fr/pages/region.md
EVWorth and others added 4 commits April 1, 2026 22:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants