[1.0.9] i18n Support in ContentBox

Hi guys,

OK I’m looking at producing a multilingual site probably in 4 languages to begin with, English, German, French and Chinese.

I know ColdBox has great multilingual support via i18n and I’d like to leverage the plugin within ContentBox (pages, blog/news entries etc.)

What would be the best way to do this? How would you display localised strings in page titles and content?

Any help or a nudge in the right direction would be great.

Thanks,

Richard McKenna

Richard there are several ways and I would like to find the easiest for folks.

Can you lay out for me what parts would require resource access?

This way I can see what is the best way for translation and also rb access.

Hi Luis,

Yes of course.

I assume layouts and views can just pull keys from the resource bundles via the standard plugin method. But I think the following would require access to the resource bundles.

Page Titles
Page Content
HTML Attributes (Keywords and Description)
Blog Entry Titles
Blog Entry Content and Excerpt
HTML Attributes (Keywords and Description)

Category Names
Custom HTML Content
Widget Options (for example, when you insert the Categories widget it asks for a title)
Global HTML
System Settings (like Site tag line, site description and the offline message)

Also in system settings you could set the default locale.

One option for the pages/blog entries is you could create your initial page add whatever content you want and this would be assigned the default locale (set in the system settings) you could then add translations to to that page. Effectively adding multiple content entries to the page each with their own locale.

I hope that makes sense and it’s what you were after. I’m sure I’ve missed a few things and I’m sure you already have your own thought’s on the best way to implement it.

I’m still learning ColdBox/ContentBox but I’m always happy to help any way I can.

Thanks,

Richard

This is perfect Richard. I have definitely seen many implementations and still deciding what best route to go.

One thing we are planning is for the custom HTML to act as resource bundles as well. So you can store translations in the value store.

We are planning also importers for the Custom HTML from ColdBox resource bundles, XML, json, csv and more.

This way you can import localized content easily.

Anyways I need as much input as possible in order to plan it. As I would like to also allow for a convention of locales via the URL.

/en/home
/es/home
/de/home

Etc