Approaches to multilingual content

I’m in the process of designing an ember app which should support multilingual content. The back office is all in one language and can add/edit projects with multiple languages.

The only thing I’ve found so far is ember-i18n which takes care of static content, but what about dynamic content?

A couple of approaches have come to mind:

Separate api endpoints or some kind of header will indicate to the server which language to return

Pros:

  • Easy to implement in our back end
  • Less data down the wire

Each ember model will have an array of all languages and their content

Pros:

  • Easy editing of multiple languages
  • No page reload required to switch language in front end

Is there some project for this already? Or anyone have any experience with multilingual content?

we have a quite large application and therefore we’re preprocessing our Handlebars templates at the backend on request. we wrote our own preprocessor with translating capabilities which pulls in the right language from ResourceBundle files and delivers the template in the requested language… don’t know if this is an option for you as this requires the application to have synchronous template loading…

I need to manage a multilingual content in my application, did you made it? How do you made?

Usually (in other cases) I use a json like the next to manage multi-lingual content: {“template”: { “name”:{ “es”:“Prueba 1”, “en”: “Test 1” },…}

As I understand your second aproach, means every localized text, should be an object, and If I understand correctly ember-data, every object requires and ID, it means every localized text on the application should have an ID.

Thanks!