Based on deleted https://github.com/gacha/gacha.id.lv/blob/master/_plugins/i18n_filter.rb
- Add
jekyll-i18n-dateto_pluginsfolder of your site. - Create folder
_localesand put some locale files from https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale there. - Add lang variables to
_config.yamlor to frontmatter of any page/post like this:
lang: de- Localize your Date/DateTime/Time variables with
{{ page.date | localize: "%d.%m.%Y" }}or
{{ post.date | localize: "%d.%m.%Y", "es" }}
- Lang parameter in liquid
- Page
- Site
If no locale file for language parameter is found in _locales or date is nil, default date format is displayed.
If "date" happens to be an integer value, it is converted with Time.at() (this rather suprising behaviour should probably be changed)