Monday, February 8, 2010

i18n support in dialogs (Magnolia 4.3)

Multi language support by maintaining a separate hierarchy per language has been supported since ever. In Magnolia 3.5 we added i18n support for multiple language sites allowing to have a single hierarchy. But we were still missing a nice built-in support for entering 18n data in the dialogs.

Till now the developer was forced to create a field per language (title_de, title_fr, ..). The positive thing about that was that one was able to place the fields as one pleased, by either putting them together in one place or having extra tabs per language. But the drawback of that was, that one had to add this fields per language and that once you wanted support more than 4 languages you had trouble to place the fields in a sensible way.

For instance it would be a nightmare to use STK in such a scenario as one had to adapt all the dialogs manually.

So we decided to improve that for 4.3. You will now mark a dialog field as i18n aware by adding an i18n nodedata to its definition. The dialog will then render the dialog accordingly based on the current language.

First we wanted to have the language chooser in the dialog but failed to find a solution which is nice and also not to complicated to implement (we will rewrite the UI for 5.0). So we came to the conclusion that selecting the language in the main bar of the page makes much more sense. The edit/new bar will then pass the current content language to the dialog. The dialog looks then 100% the same as in a single language scenario but is i18n aware in the way that it renames the field as marked to be i18n aware to the correct name: title_de, title_fr, …

Beside we will also support per site i18n configuration, so that one can work with quite complex scenarios.

1 comment:

Magister said...

Nice, nice, nice! This is what we need :-) Good ideas, Philipp!