I18N/G11N/L10N with CFSELECT

This isn't, by any means anything "advanced". But some of you who are getting started in globalizing your web apps may find it of interest.

I have a small bilingual ColdFusion site in which I just finished making a CFSELECT list of categories display in the appropriate language. I have been using Java Resource Bundles for this kind of work, but didn't know how to accomplish this, so I posted the question in one of the Adobe ColdFusion forums. A reply by a gentleman named Michael in that forum was a great help in coming up with the solution.

For those interested in I18N/G11N/L10N, here is the scenario:

A list of categories is used to select a category for a company being added to the database. As you would expect, the list comes from a Categories table that containes columns 'CategoryID' and 'CatName'. That table has now become what I think of a a "Super Resource Bundle", as it includes the key names and the translations, as opposed to having a separate 'name.properties' file for each language.

I added two columns: 'CatName_en_US' and 'CatName_es_CO', which are the source for the CFSELECT, depending on the 'session.locale'. I made minor changes in a couple of CFC methods that handle these things, and voilá, there is a bilingual select list. The beauty of this is that if I want to add another language, say 'fr_FR' or 'it', all I have to do is add a column - 'CatName_fr_FR' or 'CatName_it - with the translations, and that's it!

If anyone is curious enough to check this out, just go to http://www.dircolombia.com/ - if you want, change to English on the text nav bar at the top - and do a company search.

You may even want to register and add your company to advertise it to the Colombian community, it doesn't cost anything; I'll be happy to add one or more new categories – RIA, Web Applications, whatever. I...iii know, but no, there is no punch line: lately, Colombia has been written up as the Latin country having the least political uncertainty; they are very American-friendly, and, between salsa and jokes, they are very much into high tech. I have spent some time there recently, after an 11 year absence, and met with incredible changes, mostly for the better.

Anybody interested in globalization, if you have observations or ideas on the subject, please post a comment.

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner