Java i18n: I throw in the towel

I've been trying to get Java's ResourceBundle object working for ColdFusion based i18n working off and on for months now, and finally today I bit the bullet and gave up. If you're messing around with ResourceBundle trying to figure out why ColdFusion refuses to find your .properties file, I recommend that you stop, take a deep breath, and check out the following: rbJava/JavaRB CFC.

Basically, it is a wrapper for the technique described in this ColdFusion Developer's Journal article, that uses FileInputStream to read in an individual properties file. It seems that no one's found a way to get Java to pick the right file for you in ColdFusion.

That link offers three different underlying techniques for localization; I went with the coreJava version, but depending on your needs you might want to choose something else. The coreJava implementation gave me more than enough options, it worked out of the box, and I got it working with new keys and some new wrapping logic in 30 minutes.

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me.

Post a job. Find one.

Interested in becoming a sponsor? Contact me.