https://github.com/gabrielgil/angular-chrome-i18n
Make life easier centralizing translations of @googlechrome apps that use @angular
https://github.com/gabrielgil/angular-chrome-i18n
angular chrome-app
Last synced: 21 days ago
JSON representation
Make life easier centralizing translations of @googlechrome apps that use @angular
- Host: GitHub
- URL: https://github.com/gabrielgil/angular-chrome-i18n
- Owner: GabrielGil
- License: gpl-3.0
- Created: 2016-07-28T17:52:40.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-09-26T14:53:14.000Z (over 8 years ago)
- Last Synced: 2025-02-27T23:20:00.002Z (over 1 year ago)
- Topics: angular, chrome-app
- Homepage: https://www.npmjs.com/package/angular-chrome-i18n
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
### Install
It is a standard but no readme is complete with a reference to NPM.
``` bash
npm install angular-chrome-i18n --save
```
### Usage
#### As a filter (Recomended)
Include the filter module file `angular-chrome-i18n_filter.js`.
Inject into your angular module
``` js
angular.module('MyApp', ['angular-chrome-i18n.filter']);
```
Use in your template...
``` html
{{ 'loginText' | i18n }}
```
...or in your Javascript
``` js
app.controller('MyController', function ($filter) {
$scope.appTitle = $filter('i18n')('appTitle');
});
```
#### As a directive
Include the directive module file `angular-chrome-i18n_directive.js`.
Inject into your angular module
``` js
angular.module('MyApp', ['angular-chrome-i18n.directive']);
```
Apply the `i18n`directive passing a message key to search. E.g.
``` html
```
### Development
So maybe you care, this is the
[c9 development environment](https://ide.c9.io/gabrielgil/angular-chrome-i18n)
I used to create this.