Managing multi language

I’ve been meaning to put together a tutorial on this. The gist is, I mount an express router on every language prefix , /en, /fr, /nl, etc.

When the request is made to serve up the ember app, I thread the prefix through to Ember as a global that is used to set the router’s rootURL.

This way, your routes within Ember-land do not need to know about :lang it’s just implied as the prefix for every route. Side note, this is also how I preload the document with the requested language’s translations instead of blocking to fetch the translations or building the translations with the app code.

I may eventually publish an optional addon as part of the ember-intl suite to make this easy to adopt.