Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A Jekyll boilerplate for internationalization (i18n) without plugins.
Jekyll I18n is a Jekyll boilerplate for adding multi-language support to static sites without any i18n plugins, built around mirrored collections and Liquid includes, and it runs on GitHub Pages out of the box.
Jekyll I18n is a plugin-free internationalization boilerplate that lets you build multi-locale Jekyll sites using only the built-in tools. You define locales in _config.yml, mirror your collections per locale (e.g., _photos and _photos_pt), and use a set of Liquid includes to connect translations, localize dates and strings, and fall back to the default locale. The project is maintained by Letra Studio, and the repository itself is published as a demo GitHub Pages site. It requires Jekyll 3.7.0 or higher (3.8.0 if you use collections_dir).
_config.yml with baseurl, lang (e.g., en-US, pt-PT), and a display name; the default locale outputs to the site root.photos_pt), matched via a collection_basename front matter default, and gets its own permalink settings.document_id; you can override it in front matter when filenames differ.i18n/i18n at the top of a layout defines locale, localized_collections, localized_pages, default_page, strings, and document_id variables for use in templates.default_page gives you access to the default-locale version of a document so you can use default filters to fill in missing translations (e.g., image URLs, metadata)._data/strings.yml (and strings_pt.yml) and format dates with locale-specific date_formats, including month/weekday translations, via the i18n/date include.Jekyll I18n is aimed at developers and site owners who want a multilingual Jekyll site without committing to plugin-based i18n solutions. It suits:
document_id matching and default-locale fallbacks to keep content in sync.default (English) and a pt (Portuguese) locale as shown in the repository’s demo, with URLs at / and /pt, and publish translated pages with localized permalinks._posts into _posts_pt, keep filenames identical for automatic matching, and build a language switcher that links document_ids between locales.fotografia-1.markdown) and add document_id: folder/document front matter to map them to the source document while keeping each locale’s URL structure._data/strings.yml and use the strings variable in layouts to switch the entire site’s display language.You start by adding locales, mirrored collections, and front matter defaults to _config.yml (e.g., collection_basename: photos for all photos* collections, and locale/lang per folder pattern). Then place localized content in suffixed collection folders. In your layout, include the i18n include and use the provided variables to render localized content, link translated pages, format dates, and fall back to the default locale.
Pros:
Cons:
document_id is generated via complex Liquid, and nested loops (like a navigation menu) multiply the work.jekyll-sitemap doesn’t add hreflang alternates, jekyll-feed only generates a feed for the default posts collection prior to version 0.11.0, and jekyll-seo-tag requires lang front matter on every document for correct og:locale.Yes. The boilerplate uses no plugins and is itself published as a GitHub Pages demo site. You can deploy it as-is to a GitHub Pages-enabled repository.
The minimum is Jekyll 3.7.0. If you use collections_dir in your configuration, you need Jekyll 3.8.0 or newer.
Matching is automatic when the file path relative to the collection folder is identical. If filenames differ per locale, set document_id in the front matter of the translated file to the path of the source document.
Yes. The boilerplate supports asymmetric content — you can omit a locale’s copy of a document and use default_page in Liquid to fall back to the default locale version.
