Coldbox and resource bundles
Tags: Coldfusion, Coldbox
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.
-
<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 -
<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"><code><br />#getPlugin("i18n").dateLocaleFormat(posted)#<br /></code><br /><br />Couldn't be any more simpler.<br /></font></p>
# Posted By Andrew Scott | 8/28/08 7:01 AM -
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



TweetBacks