I've got a mid-sized site a client needs to have translated into a few 
languages.  They do not want to use a web service (like google) for this.  They 
would like to have more control over the output.

The content is partially in html on the pages, and partially in the database as 
well (a little e-commerce in addition to the standard aboutus/corp info) Images 
contain text to but this is another issue.

So I started down the path of creating separate views for each language each in 
their own language folder.  Then I set a session var of  the currently selected 
language and put that right in the include statement for my view.  Works great 
for the html/image stuff. 

What I am trying to figure out is the best way to handle the DB driven stuff.  
Just create new tables or fields that contain the translated text?

Another strategy that I thought about was to store translations in the 
application scope.  Create a common function that would take a string of text 
and a language identifier.  If it found a mapping in the app scope for that 
string and the language requested it would return the translated text and write 
it to a log to notify a translator (person) that something needed to be added 
to the map.  If not it would simply return the string untranslated.  Benefits 
of this approach would be that one single view could service any number of 
languages, and it would work with the stuff coming from the DB as well.  The 
downside to this approach might be efficiency (how much data can you really 
store effectively in the app scope?) 

Any other ideas or feedback out there? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327655
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to