Creating a Multilingual Jekyll Blog

Learn how to create a multilingual Jekyll blog with language switchers, SEO optimization, and translation workflows. Step-by-step guide to structuring content, managing metadata, and deploying a fast, global-ready static site.

Creating a Multilingual Jekyll Blog
Photo by Andrew Neel / Unsplash

Building a multilingual blog is one of the best ways to expand your audience, improve accessibility, and increase engagement worldwide. While Jekyll is best known as a static site generator for fast, SEO-friendly blogs, it doesn’t include multilingual support out of the box.

Fortunately, with the right planning, structure, and tools, you can make your Jekyll blog fully multilingual without sacrificing performance or maintainability.

This guide walks you through every stage — from initial setup to translation workflows — so you can create a multilingual Jekyll site that’s both technically solid and user-friendly.

Why Create a Multilingual Jekyll Blog?

Before diving into the implementation, it’s important to understand the benefits and challenges of adding multilingual support to a Jekyll site.

Benefits

  • Reach a global audience — Cater to readers in different languages and regions.
  • Improve SEO — Google and other search engines reward sites that serve relevant content in users’ native languages.
  • Enhance accessibility — Non-English speakers or multilingual audiences can access your content in their preferred language.
  • Boost engagement — Readers are more likely to subscribe, share, and interact with content in their own language.

Challenges

  • Content duplication and maintenance — Multiple versions of the same post require updates in all languages.
  • Complex navigation — You’ll need a system to switch between languages while keeping users on the corresponding page.
  • Translation workflow — Coordinating human or AI translations into your publishing process can be tricky.

Planning Your Multilingual Structure

There are two common approaches for multilingual site structures in Jekyll:

Option 1: Separate Language Folders

Example:

/_en/
/_fr/
/_es/
  • Each language has its own folder with posts and pages.
  • Pros: Simple to implement, clear URL structure (/fr/blog/my-post).
  • Cons: Can lead to content duplication and harder cross-referencing.

Option 2: Single _posts Folder with Language Codes in Filenames

Example:

/_posts/2025-08-11-my-post.en.md
/_posts/2025-08-11-my-post.fr.md
  • All languages live in the same _posts folder, differentiated by language code.
  • Pros: Centralized content, easier to loop through posts programmatically.
  • Cons: Requires code in templates to filter by language.
💡
Recommendation: For blogs with few languages, the single _posts folder approach is easier to manage. For large multilingual sites, separate folders often work better.

Setting Up Your Jekyll Project

If you haven’t started your Jekyll blog yet, you can initialize it with:

gem install jekyll bundler
jekyll new my-multilingual-blog
cd my-multilingual-blog
bundle exec jekyll serve

This sets up a default blog. We’ll now extend it to handle multiple languages.

Adding Language Metadata

To make your blog multilingual, you need to define the language of each page and post.

Add lang Front Matter

In each markdown file:

---
layout: post
title: "Hello World"
lang: en
---

Translated version:

---
layout: post
title: "Bonjour le monde"
lang: fr
ref: hello-world
---

Here:

  • lang indicates the language code.
  • ref links related translations together (important for switching languages without losing page context).

Configuring _config.yml for Multiple Languages

In your _config.yml:

languages:
  - en
  - fr
  - es
default_lang: en

This will help in loops, navigation, and generating menus.

You can also add per-language settings:

lang_names:
  en: English
  fr: Français
  es: Español

Creating a Language Switcher

A multilingual blog should let users switch between languages without going back to the homepage.

Example Language Switcher in Liquid

<nav class="language-switcher">
  {% assign current_ref = page.ref %}
  {% for lang in site.languages %}
    {% assign translated_page = site.pages | where: "ref", current_ref | where: "lang", lang | first %}
    {% if translated_page %}
      <a href="{{ translated_page.url }}" {% if page.lang == lang %}class="active"{% endif %}>
        {{ site.lang_names[lang] }}
      </a>
    {% endif %}
  {% endfor %}
</nav>

This:

  • Loops through available languages.
  • Finds the translation with the same ref.
  • Highlights the current language.

Structuring Navigation and Menus

If your menus need to be translated, store them in _data/navigation.yml:

en:
  - title: "Home"
    url: "/"
  - title: "Blog"
    url: "/blog/"

fr:
  - title: "Accueil"
    url: "/fr/"
  - title: "Blog"
    url: "/fr/blog/"

Then load them in your layout:

{% assign nav_items = site.data.navigation[page.lang] %}
<ul>
  {% for item in nav_items %}
    <li><a href="{{ item.url }}">{{ item.title }}</a></li>
  {% endfor %}
</ul>

Use language codes in permalinks for clarity:

permalink: /:lang/:categories/:title/

Then in each post:

lang: fr

This automatically prefixes /fr/ to your French URLs.

Plugins for Multilingual Support

Jekyll doesn’t have built-in multilingual handling, but you can use plugins.

  1. jekyll-multiple-languages-plugin
    • Automatically generates separate language versions of your site.
    • Provides filters for translation linking.
  2. jekyll-polyglot
    • Simple configuration.
    • Builds each language into its own subfolder.
  3. jekyll-multilingual
    • More lightweight, minimal setup.
📔
Note: GitHub Pages doesn’t allow all custom plugins by default. You may need to build your site locally or use GitHub Actions/Netlify for deployment.

SEO Considerations for Multilingual Blogs

Search engines need to know which content is intended for which audience.

Use hreflang Tags

In your <head>:

{% for lang in site.languages %}
  {% assign translated_page = site.pages | where: "ref", page.ref | where: "lang", lang | first %}
  {% if translated_page %}
    <link rel="alternate" hreflang="{{ lang }}" href="{{ translated_page.url | absolute_url }}" />
  {% endif %}
{% endfor %}

Set the HTML lang Attribute

<html lang="{{ page.lang }}">

Separate Sitemaps per Language (Optional)

Some multilingual SEO strategies involve generating separate sitemaps for each language and submitting them in Google Search Console.

Translation Workflow

How you handle translations depends on your resources:

Option 1: Manual Human Translation

  • Best for accuracy and cultural relevance.
  • Use a shared spreadsheet or translation management system.

Option 2: AI-Assisted Translation

  • Tools like DeepL, ChatGPT, or Google Translate can create drafts.
  • Always review for nuance and accuracy.

Option 3: Hybrid

  • AI to create the first draft.
  • Human review for quality control.

Pro Tip: Keep ref consistent across translations so linking works correctly.

Styling and UX for Multilingual Sites

Best Practices:

  • Avoid flag icons for language switching — Use language names ("English", "Français") to avoid political or cultural issues.
  • Ensure font compatibility — Some languages (like Chinese or Arabic) require different font support.
  • Maintain consistent layout — Avoid breaking design with long translated text; use responsive layouts.

Deployment Considerations

If you use GitHub Pages and your chosen plugin isn’t supported:

  1. Build locally with:
bundle exec jekyll build
  1. Commit the _site folder to a gh-pages branch.
  2. Or, deploy via Netlify, Vercel, or Cloudflare Pages where you can run build commands freely.

Example File Structure for a Multilingual Jekyll Blog

Using _posts with language codes:

/_data/
  navigation.yml
/_layouts/
  default.html
  post.html
/_includes/
  language-switcher.html
/_posts/
  2025-08-11-welcome.en.md
  2025-08-11-welcome.fr.md
_config.yml
index.en.md
index.fr.md

Testing Your Multilingual Setup

Before going live:

  • Check every language switcher link.
  • Validate hreflang tags with Google’s hreflang testing tool.
  • Crawl your site with an SEO tool to confirm language indexing.
  • Test on devices with different language settings.

Future-Proofing Your Multilingual Blog

  • Add languages gradually — Start with 2–3 languages, then expand.
  • Automate translation reminders — Use Git hooks or CI workflows to flag posts missing translations.
  • Prepare for right-to-left (RTL) support — For languages like Arabic or Hebrew, plan CSS changes ahead.

Final Thoughts

Creating a multilingual Jekyll blog is more than just translating words — it’s about providing a seamless, culturally respectful experience for your global readers.

By carefully structuring your content, using language metadata, implementing a smart switcher, and optimizing for SEO, you can run a multilingual Jekyll site that is fast, maintainable, and welcoming to visitors from all over the world.

Whether you choose manual translation, AI assistance, or a hybrid model, your effort will pay off in increased reach and stronger audience engagement.