i18n for your Angular apps, made easy
i18n for your Angular apps, made easy
Caution
This project has been discontinued since 2024-01-15 and this project is now archived. As the AngularJS ecosystem itself has stopped long-term support since January 2022, you may already be using Angular 2+ and some of the other cool translation tools. Although it is highly recommended that you to migrate away from AJS v1, if you are still actively using AngularJS and cannot migrate yet, you may want to look at HeroDevs who offer extended support. We are not familiar with them.
More information on this decision are archived in the issue #1921.
The project resources will remain read-only for everyone. Feel free to fork.
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