1.0.0 • Published 8 years ago

angular-chrome-i18n v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

Angular Chrome i18n

This angular software provides a set of tools to retrieve translations from the internationalizated messages.json file used for Chrome Apps and Extentions.

Reference: https://developer.chrome.com/apps/i18n

Usage

As a filter (Recomended)

In yout template

<div>
  <input type="email" />
  <input type="password" />
  <button>{{ 'loginText' | i18n }}</button>
</div>

In Javascript

app.controller('MyController', function ($filter) {
  $scope.appTitle = $filter('i18n')('appTitle');
});

As a directive

Apply the i18ndirective passing a message key. E.g.

<header>
  <h2 i18n="welcomeText"></h2>
</header>