kurtsson / jekyll-multiple-languages-plugin

I18n support for Jekyll and Octopress
MIT License
923 stars 201 forks source link

Not translating in frontmatter #160

Closed NebelNidas closed 4 years ago

NebelNidas commented 4 years ago

When I have something like title: about.title in my frontmatter, as described like here, it doesn't take the actual string from my translation file (as expected), it just returns back "about.title".

_i18n
├── de/
└── de.yml
└── en.yml

de.yml:

about:
  title: Über

en.yml:

about:
  title: About
timseriakov commented 4 years ago

I am also looking for a solution to this issue

jmfrenzel commented 4 years ago

@NebelNidas if you are referencing to https://github.com/Cicero-Interactive/Cicero-Interactive-Website/tree/1d3d2944c010f563b381a1550dbe3b0bc0c37f41/_layouts you might want to add 'liquid' code into your templates ('./_layout'), c.f. https://github.com/kurtsson/jekyll-multiple-languages-plugin#54-i18n-in-templates

e.g. replace {{ page.title }} with {% t page.title %}

NebelNidas commented 4 years ago

Wow, thanks! I can't believe I've missed this line... 🤦‍♂️