handlebars-helper-i18n

v0.1.0
{{i18n}} handlebars helper
assemble assemblehelper handlebars helper i18n internationalize lang language languages and 8 more...

{{i18n}} NPM version

{{i18n}} handlebars helper

Install

Install with npm

npm i handlebars-helper-i18n --save-dev

Register the helper

var Handlebars = require('handlebars');
var helper = require('handlebars-helper-i18n');

Handlebars.registerHelper('i18n', helper.i18n);

Register the helper with Assemble

Assemble v0.6.x

var assemble = require('assemble');
var helper = require('assemble-handlebars-i18n');

assemble.helper('i18n', helper.i18n);

Assemble v0.4.x

In your project's Gruntfile:

assemble: {
  options: {
    helpers: ['handlebars-helper-i18n']
  },
  files: {...}
}

Also, be sure to add the helper to devDependencies in package.json for Assemble to automatically register the helper.

Usage

Given file name: Executive Summary 2013.md:

{{i18n "key"}}

Renders to executive-summary-2013.md.

Author

Laurent Goderre

License

Copyright (c) 2014 Laurent Goderre, contributors.
Released under the MIT license


This file was generated by verb-cli on September 12, 2014.

npm i handlebars-helper-i18n

Metadata

  • Unknown
  • Whatever
  • Laurent Goderre
  • released 9/12/2014

Downloads

Maintainers