Home

Awesome

jekyll-msgcat

Multi-lingual interface with Jekyll via .yaml message catalogs.

Updated for Jekyll 2.5.3.

Installation

Add this line to your application's Gemfile:

gem 'jekyll-msgcat'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-msgcat

Usage

Create _plugins/req.rb with 1 line:

require 'jekyll/msgcat'

Add to _config.yml:

msgcat:
  locale: ru

Default locale is always 'en'. 'en' locale is implicit, you cannot select it.

Create _msgcat.yaml:

uk:
  'Home': На головну сторiнку

_msgcat.yaml file must be in a directory where the site sources are (e.g. the same directory you provide in jekyll -s foo/bar command).

And use in Liquid templates:

{{ 'Home' | mc }}

If 'Home' key wasn't found anywhere in the message catalog, or you didn't select any locale, a string 'Home' will be used.

More info (for version 0.0.2) here.

News

License

MIT.