Code Monkey home page Code Monkey logo

handlebars-helper-i18n's Introduction

{{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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.