Skip to content

flickr/handlebars-intl

 
 

Repository files navigation

handlebars-intl

Handlebars helpers for internationalization.

Build Status

Installation

Browser

  1. Install with bower: bower install handlebars-intl

  2. Load the scripts into your page. (It does not matter which order the scripts are loaded in.)

    <script src="handlebars.js"></script>
    <script src="handlebars-intl.js"></script>
  3. Register the helpers:

    HandlebarsHelperIntl.register(Handlebars);

Node/CommonJS

  1. You can install the helpers with npm: npm install handlebars-intl

  2. Load in the module and register it:

    var Handlebars = require('handlebars');
    global.Intl = require('intl');
    require('handlebars-intl').register(Handlebars);

    NOTE: Since node (as of 0.10) doesn't provide the global Intl object (ECMA-402) you'll need to provide a polyfill. The intl NPM package can provide this or you can use another.

AMD

  1. Install with bower: bower install handlebars-form-helpers

  2. Load in the module and register it:

    define(['handlebars', 'handlebars-intl'], function(Handlebars, HandlebarsHelperIntl) {
        HandlebarsHelperIntl.register(Handlebars);
    });

(Thanks to the handlebars-form-helpers package for figuring out how to register helpers in multiple environments.)

Usage

TODO

About

Handlebars helpers for internationalization.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 86.2%
  • HTML 12.5%
  • Shell 1.3%