O'Reilly logo

Mastering Web Application Development with AngularJS by Pawel Kozlowski, Peter Bacon Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Handling translations

Being able to format dates and numbers according to local settings is only small part of the whole localization story. Usually when people think about localization it is the translation effort that comes to the mind first.

In an AngularJS application there are at least two places where we can find words to be translated to a target language: templates (partials) and strings used in JavaScript code.

For the rest of this chapter let's assume that we do have translated strings already available in a convenient format, for example JSON. Such JSON could be an object where keys correspond to logical names of fragments to be translated (For example, crud.user.remove.success), and the values are actual translated strings for a given ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required