[Coldbox-3.8.1] i18n - how to reload of resourcebundles

Hi,

I was wondering how you go about telling i18n to reload the content from the resourcebundles.

My translations reside in a database. On app init I go to the database and update these resourcebundle files with the latest translations. When these files don’t exist yet, they are created. Up until here everything is still fine. But It seems i18n is already initialized before I write these new resourcebundles, so when the page finally loads, every piece of text is unknown translation. Only when I fwreinit a second time, the new resource bundles get picked up.

I tried playing around with the init function of i18n, but it seems I’m getting nowhere.
Anybody else have an idea?

best regards,
Mikaël

You need to call the loadBundle() function with the “force” argument to true.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org
ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox

that works like a charm. Thanks a lot.

I was looking at the http://wiki.coldbox.org/wiki/Plugins:ResourceBundle.cfm documentation, but it doesn’t say anything about the force argument.
I found it in the API docs though.

API docs are the definitive source. We can’t put everything in the docs since that means recreating the API docs.

Luis Majano
CEO
Ortus Solutions, Corp

P/F: 1-888-557-8057
Direct: (909) 248-3408

ColdBox Platform: http://www.coldbox.org
ContentBox Platform: http://www.gocontentbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Social: twitter.com/ortussolutions | twitter.com/coldbox | twitter.com/lmajano | twitter.com/gocontentbox