Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KrzysiekJ/jekyll-i18n_tags
Translate your Jekyll templates.
https://github.com/KrzysiekJ/jekyll-i18n_tags
i18n internationalization jekyll translation
Last synced: about 1 month ago
JSON representation
Translate your Jekyll templates.
- Host: GitHub
- URL: https://github.com/KrzysiekJ/jekyll-i18n_tags
- Owner: KrzysiekJ
- License: mit
- Created: 2016-04-09T11:48:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T13:38:15.000Z (over 6 years ago)
- Last Synced: 2024-03-24T09:21:40.631Z (9 months ago)
- Topics: i18n, internationalization, jekyll, translation
- Language: Ruby
- Homepage:
- Size: 1.95 KB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jekyll-plugins - **i18n Tags** - i18n_tags](https://rubygems.org/gems/jekyll-i18n_tags)) -- Translate your templates. (Multi Language / Multi Lingual)
README
# jekyll-i18n_tags
This [Jekyll](https://jekyllrb.com) plugin provides a simple tag for translating templates.
## Installation
Add the `jekyll-i18n_tags` gem to the `:jekyll_plugins` group in your `Gemfile`:
```ruby
group :jekyll_plugins do
gem 'jekyll-i18n_tags', '~>1'
end
```## Usage
Put the configuration and translations in your `_config.yml`:
```yaml
# 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:
```liquid
{% 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](http://jekyllrb.com/docs/configuration/#front-matter-defaults) to faciliate this).
## Versioning
This project uses [semantic versioning](http://semver.org/).
## License
This software is licensed under [the MIT License](LICENSE).