/ng-translate

AngularJS Translation Module

Primary LanguageJavaScriptDo What The F*ck You Want To Public LicenseWTFPL

ngTranslate Build Status Build Status Dependency Status

i18n in your AngularJS apps

Checkout the demos and help out making things better. You can start by reading the docs. If you like the module and use it in your projects, make it public on ngmodules!

There's also a mailinglist for questions and discussions.

Features

  • translate filter
  • translate directive
  • translate service
  • multi-lang support
  • asynchronous/lazy loading support

Attention: Since we're currently working on a specification for Reusable Angular Components, this project will have some breaking changes once the spec is called final.

Quick Start

Install module via Bower:

$ bower install PascalPrecht/bower-angular-translate

Inject ngTranslate module as a dependency into your app:

var app = angular.module('myApp', ['ngTranslate']);

Teach $translateProvider translations:

app.config(['$translateProvider', function ($translateProvider) {
  $translateProvider.translations({
    'TITLE': 'Hello',
    'FOO': 'This is a paragraph',
  });
}]);

Translate your app:

<h1>{{ 'TITLE' | translate }}</h1>
<p>{{ 'FOO' | translate }}</p>

To learn what else is possible, read the full documentation.

Contributors

Special thanks are going to the following devs who put a lot of love into this module:

WTFPL