Eleventy Plugin I18n screenshot

Eleventy Plugin I18n

Author Avatar Theme by Adamduncan
Updated: 11 Oct 2021
109 Stars

Eleventy plugin to assist with internationalization and dictionary translations

Overview

The eleventy-plugin-i18n is a powerful tool designed to enhance internationalization for Eleventy sites. This plugin simplifies the process of managing dictionary translations, making it easier for developers to create multilingual websites. By offering a contextually-aware i18n filter with dynamic string interpolation, it provides a robust solution for anyone looking to localize their content effectively.

With the rise of global audiences, having intuitive language support is essential, and this plugin caters to that need with ease. Its straightforward configuration allows developers to quickly set up multiple language directories and manage translations seamlessly, ensuring a smooth experience for users across different regions.

Features

  • Contextual i18n Filter: A smart filter that provides language translations based on context, streamlining the localization process.
  • Dynamic String Interpolation: Easily integrate dynamic variables within translated strings for personalized user experiences.
  • Flexible Directory Structure: Supports both language-only and country-specific directory naming conventions for enhanced organization.
  • Custom Locale Data Files: Enables the use of locale-specific JSON or JS files that contain translation dictionaries, keeping code clean and manageable.
  • Fallback Locales Support: Automatically falls back to alternative translations when a specific language string is missing, enhancing user experience.
  • Comprehensive Nunjucks, Handlebars, and Liquid Support: Fully compatible with key templating engines, ensuring versatility in usage across different project setups.
  • Warnings for Missing Translations: Alerts users in the console when translations or fallback values cannot be found, promoting proactive management of localization issues.