metalsmith-multi-language icon indicating copy to clipboard operation
metalsmith-multi-language copied to clipboard

Outputting the locale

Open shaigh-mw opened this issue 9 years ago • 3 comments

I can't seem to output the locale value in any of my pages. I can see the value in my Debug output as locale: "de|en" however {{locale}} outputs no value in the template.

Any Ideas what I've missed?

The page structure:

pages/ ├── de │   ├── about │   │   └── index_de.md │   ├── courses │   │   └── 1 │   │   └── index_de.md │   ├── glossary │   │   └── index_de.md │   ├── index.md │   └── privacy-and-cookies │   └── index_de.md ├── en │   ├── about │   │   └── index.md │   ├── courses │   │   └── 1 │   │   └── index.md │   ├── glossary │   │   └── index.md │   └── privacy-and-cookies │   └── index.md └── index_en.md

The CLI configuration: 'metalsmith-multi-language': { default: 'en', locales: ['en', 'de'] }

shaigh-mw avatar Dec 13 '16 10:12 shaigh-mw

I also have this issue.

alessandro-molari avatar Aug 23 '18 18:08 alessandro-molari

{{ locale }} works for me...

Ahh! Here's why. I am using a humble fork of mine, https://github.com/vale981/metalsmith-multi-language

vale981 avatar Sep 17 '18 18:09 vale981

Metalsmith seems kinda dead to me...

vale981 avatar Sep 17 '18 18:09 vale981