Coldbox and resource bundles

Now that this website now uses coldbox as it's main framework, I added support for multiple languages. The one thing that I found a breeze was integrating the resource bundle into my application.

It was a huge learning curve, as time wasn't on my side for awhile. As I was on holidays for a few weeks, I sat down and began planning the change. The one change is resource bundles, and having different languages. Although this is not fully operational, but if I had the translation for french. Some of the site could be localised, which would then leaves the content.

Well I came across this article Supporting multiple languages, which got me to thinking of adding this support into the framework.

What this means, is that if for example a translation hasn't be found. Then it could be possible to do a look up, and grab the required translation. Both in the cases of static text, and dynamic changeable text, like blog entries for example.


  • MJ's Gravatar <p>I'm just starting to learn Coldbox myself. I would like to hear a little more about exactly what it took to integrate the resource bundles into your site.</p>
    # Posted By MJ | 8/28/08 6:49 AM
  • Andrew Scott's Gravatar <p>Thats the beauty, i18n is part of the package.</p><p>All you need to do is follow the instructions, and that is as simple as putting the required information into the config file. Once you have that, then there is a small bit of code available to you.<br /><br /><font size="2">&lt;code&gt;<br />#getPlugin(&quot;i18n&quot;).dateLocaleFormat(posted)#<br />&lt;/code&gt;<br /><br />Couldn't be any more simpler.<br /></font></p>
    # Posted By Andrew Scott | 8/28/08 7:01 AM
  • Jonathan's Gravatar Do you know of any detailed examples?
    # Posted By Jonathan | 10/1/11 10:28 PM
  • # Posted By Andrew Scott | 10/4/11 8:40 AM