JSRocksHQ / harmonic

The next static site generator
http://harmonicjs.com/
MIT License
282 stars 26 forks source link

Expose the current language to templates #173

Closed UltCombo closed 8 years ago

UltCombo commented 8 years ago

All templates (index, post, page and category) should have a global variable indicating in which language it is being rendered.

This, coupled with config's custom properties, will allow for rudimentary i18n using keyed dictionaries. There are many other interesting language-specific use cases that this will cover as well.

As for the naming, I believe lang is a suitable global variable name.

jaydson commented 8 years ago

Hey! Thanks for this @UltCombo !