Lightweight AngularJS module for localizaion with messageformat files.
The module provides a (html enabled) directive and a filter for localization.
Both use precompiled messageformat translations. For more information about messageformat see https://github.com/SlexAxton/messageformat.js
The module comes with both: a directive and a filter.
This module provides the tr-i18n directive. The directive extracts the message id from the content of the element:
Scope variables can be bound by providing them with the tr-i18n attribute:
The parsed hash will be applied to the i18n-function provided by the compiled messageformat source.
Variables are escaped. However, the translated message may contain html markup.
The filter may be used with or without additional params. Params are automatically updated by angular.
Like in every filter, markup is escaped. If you need html consider using the tr-i18n or ng-bind-html directives.