angular-translate is an AngularJS module that makes your life much easier when it comes to i18n and l10n including lazy loading and pluralization.
It provides components like filters and directives, asynchronous loading of i18n data, full pluralization support through MessageFormat and much more!
angular-translate is very flexible. You can build your own loaders, storages or error handlers and extend angular-translate to your needs!
var app = angular.module('at', ['pascalprecht.translate']); app.config(function ($translateProvider) { $translateProvider.translations('en', { TITLE: 'Hello', FOO: 'This is a paragraph.', BUTTON_LANG_EN: 'english', BUTTON_LANG_DE: 'german' }); $translateProvider.translations('de', { TITLE: 'Hallo', FOO: 'Dies ist ein Paragraph.', BUTTON_LANG_EN: 'englisch', BUTTON_LANG_DE: 'deutsch' }); $translateProvider.preferredLanguage('en'); }); app.controller('Ctrl', function ($scope, $translate) { $scope.changeLanguage = function (key) { $translate.use(key); }; });
This is a paragraph
When building a product with global reach, angular-translate is a must-have addition to AngularJS. It integrates seamlessly with your application, making internationalization as easy as maintaining a few files containing all translations. angular-translate works very nicely with all AngularJS dynamic data-binding features, making it a breeze to switch languages on-the-fly. Highly recommended!
I looked for some localization stuff to bring translations from server to client. There were some modules for i18n, but they didn't match all my needs. Then I found an angular-translate and I loved this module! Seriously. I was really surprised by its quality and support. It's also really awesome that the author of angular-translate is always open for new ideas!
I needed i18n and l10n support on a new project that integrated well with AngularJS, angular-translate fits the bill perfectly. Plenty of features, well thought out interfaces and the documentation is clear and easy to follow. IMO this is the best framework I've seen written with AngularJS