Question

I am wondering what is the best way to realize a multi language support for a web app with handlebars and EmberJs in the back. There is no native multi language support in handlebars.

I found a handlebars helper https://gist.github.com/tracend/3261055 The code looks good and pretty simple, but I didn't test it yet.

Do you know another plugins/helpers?

Was it helpful?

Solution

I use this one which is specific for Ember: https://github.com/jamesarosen/ember-i18n

It adds a 't' handlebars helper :

{{t main.offers countBinding="offers.length"}}

It supports plurals (via CDLR.js) and is not limited to handlebars thanks to Em.I18n.TranslateableProperties mixin, which allows property translation via a convention on any Ember Object.

OTHER TIPS

It is very easy to write a helper, so you will find none or many handlebars implementations.

I'm using https://github.com/jquery/globalize for my projects. The implementation is a peace of cake.

Globalize is maintained by JQuery, supports everything you need and has an active community.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top