Sebastian Tschan, also known as blueimp, is the author of the hugely popular jQuery-File-Upload project. It turns out he also writes AngularJS modules. His recent AngularJS project is dedicated to localization, and works well with a Grunt task that builds locales:
- angular-localize (License: MIT, npm: angular-localize) provides a localization directive
- grunt locales (License: MIT, npm: grunt-locales) parses
localizeattributes in HTML files
The basic angular-localize directive is used by adding the
localize attribute to a tag. The text in the element will be used as the translation key, but you can use
localize="key" to specify the key instead, which is useful if the final content hasn't yet been copy edited.
localize directive also observes
data-* attributes and passes them as objects to translation functions, so data can be inserted into text dynamically.
There's also a
localizeFactory for creating your own attribute-based