angular-gettext

Super-simple translation support for Angular.JS

Key Features

Globalize effortlessly
Works seamlessly with Angular.JS
Trivial to integrate
Built on a rich ecosystem of gettext tools
Tiny footprint
Correct plurals in over 130 languages

Effortless translations

Angular-gettext let's you focus on developing your application. Just write everything in English and annotate which parts should be translated. The tools do the rest.

Marking a string as translatable is as simple as adding an attribute:

<a href="/" translate>Home</a>

No need to maintain translation codes or magic values, that just causes headaches!

Seamless Angular.JS integration

Translating your application doesn't mean you have to give up any of the good stuff that Angular.JS provides. Interpolation and everything else we love and are used to just keep on working:

<a href="/" translate>Hello {{name}}</a>

And with a minified footprint of less than 3kb, you don't have to worry about the size of your application.

Correct plurals in all languages

Not every language works like English. Did you know that Polish uses three plural forms? Or that Irish uses five? No worries, angular-gettext handles all of this for you. Just provide a plural string where needed.

<span translate translate-n="count" translate-plural="There are {{count}} messages">There is {{count}} message</span>

The span above will always show a correctly pluralized message, even if the language uses wildly different pluralization rules.

A full list of supported languages (over 130) can be found here.

Rich tool support

The widely used gettext format is used in angular-gettext (hence the name). This means you can use widely established translation tools like Poedit. Or you can use an online translation platform like Pootle or Transifex.

The upside of this? Non-technical users can help out by translating. Or you can use professional translation services. Better results, faster.

Get going fast

Adding angular-gettext to your project only takes minutes. There's a sample application, a step-by-step guide and comprehensive documentation of all the tools you need.

Get started!

Angular-gettext was written by Ruben Vermeersch and is licensed under the MIT license. You can get it on GitHub.