JSRocksHQ / harmonic

The next static site generator

Home Page:http://harmonicjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose the current language to templates

UltCombo opened this issue · comments

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.

Hey! Thanks for this @UltCombo !