Translate your Jekyll templates.
This Jekyll plugin provides a simple tag for translating templates.
Add the jekyll-i18n_tags
gem to the :jekyll_plugins
group in your Gemfile
:
group :jekyll_plugins do
gem 'jekyll-i18n_tags', '~>1'
end
Put the configuration and translations in your _config.yml
:
# Source language is optional. If set, translations to it will not be
# performed.
source_lang: en
translations:
pl:
Hello, world!: Witaj, świecie!
In your templates, use the t
tag:
{% t Hello, world! %}
For each page which uses the translation tag, you need to set lang
variable (you may want to use front matter defaults to faciliate this).
This project uses semantic versioning.
This software is licensed under the MIT License.