When we started working with AngularJS, one of the first non-trivial challenges we were faced with was to find a way to localize the text in our app.
We had a few basic requirements for the localization solution:
- Will not require any changes to my existing controllers.
- Will not polute the current $scope.
- Be able to define the desired string directly on the markup with a simple syntax.
- Be defined as a module that can be minified and compiled with RequireJS.
Some brief research did not produce any options we were completely satisfied with. We then considered the RequireJS i18n module. It is a very simple and elegant solution that's worked very well for me in my previous projects, so I set out to write a small module that will bridge the gap between this module and my Angular JS code and views.
Your new post is loading...