Table of contents

Angular 2 will change a lot (RIP everything you know) - also the client-side i18n support. Chirayu Krishnappa and Pascal Precht gave a talk on this year's ng-conf in Salt Lake City about how to use i18n for future Angular apps. Currently there is no standard how you localize your angular app - we are using angular-translate from Pascal Precht. It is working great with JSON files + Lingohub. (Wanna try? Just create an Angular project on Lingohub and upload your JSON files).

New Angular i18n usage and tooling

Your texts (which should be translated) stay in the HTML templates. But a translator can't use HTML to translate, that is why Angular will offer an Extraction Tool. This tool extracts texts (also texts from placeholders) from your HTML templates. It will support different (standard translation) file formats, for example XLIFF or PO.


A good solution lets you localize your apps in whatever shape they are.

Lingohub already supports that kind of formats, so you will have no problems giving your translators a nice UI to translate your texts on Lingohub!

These two code examples show you the main differences between angular-translate and the Angular i18n approach with the new Message Extraction Tool.

Angular 2 Tool then generates JSON or HTML templates for different languages. (At the moment it is not yet sure how the generated JSON will look like)

An important feature will be that you can add context for the translator so that he knows what the text actually means, just by adding the i18n attribute to the HTLM tag. I am going to write another blogpost about how the process will work once the Extraction Tool is available (probably in May 2015)!

You will find first implementations of the new i18n ecosystem already in Angular 1.4, where they will add support for pluralization and gender.

All these changes sound very exciting and is definitely a step towards easy translation of an Angular app. Of course Lingohub will support both approaches. Be Global, Go Local!

References: Better i18n for your Angular apps (Chirayu Krishnappa and Pascal Precht)

Special Thanks to Pascal Precht for additional information.

Lingohub - Localize & Translate Software

This article is brought to you by Lingohub, a translation management system used by hundreds of teams to store and manage their translations. Lingohub helps you automate mundane tasks of software localization, while ensuring high-quality translations that are always up-to-date. With Lingohub, you can translate web apps, mobile apps, websites, games, design files or even documents. Try it for free right here.

Try lingohub 14 days for free. No credit card. No catch. Cancel anytime