angular-chrome-i18n
v1.0.0
Published
Make life easier centralizing translations of Chrome apps that use Angular.
Downloads
3
Readme
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 i18n
directive passing a message key. E.g.
<header>
<h2 i18n="welcomeText"></h2>
</header>