Sounds like a very simple, elegant approach, Andy.

Thanks for sharing that info...

Rick

----------------------------------------
 From: "Andy Mcshane" <[EMAIL PROTECTED]>
Sent: Friday, April 22, 2005 5:04 AM
To: CF-Talk <[email protected]>
Subject: RE: translating websites 

Ok guy's, here is a description of how I solved this problem for me. Firstly I 
have a site that contains approxiamately 1750 pages. These pages are all 
grouped together inside Directories i.e. 'Players', 'Competitions', etc. Each 
of these Directories also contain a Directory called 'Language'. The 'Language' 
Directorycontains a number of XML files called 'English.xml', 'French.xml', 
etc. One XML file per language. All of the text in my CFM pages is replaced 
with the following;

#translate("LABEL_NAME","PAGE_NAME","FOLDER_NAME")#

The translate function lives in my application.cfm page and is as follows;

#onceonly#

Each of my users have a language preference specified that is held within the 
session scope, this variable is used to decide which XML file to include. The 
XML file is searched for the required label and the text is then returned to 
the page. One CFM page, multiple languages.

This works perfectly for me and is very efficient however I wrote this some 
time ago and I am in the process of redoing it to see if I can make it any 
better by possibly using cached SQL queries or using the application scope, to 
be decided.

Now the tricky part, maintaining the text. ALL of my English text is stored 
inside of a SQL database. I have written an administration interface that 
exposes all of the English text to the screen in small manageable chunks that 
allows an interpreter to translate the text for me. Once the text is translated 
then it is simply a click of a button and a CFC that I wrote generates all of 
the Language XML files for a particular directory. Anytime that I want to add 
new text I simply add it via my administration interface which then makes it 
available for translation. If a translation for a certain piece of text doesn't 
yet exist then the English version is displayed by default, if a piece of text 
is missing completely then this is flagged on the site.The best part of all of 
this is I can add new languages and generate XML files at a click of a button! 

Unfortunately all of this code is packaged as part of a much larger 
administration site and it will take me a long time to make it a seperate stand 
alone interface but I do intend to do that one day.

With regards to the actual translation, this is where I am very lucky, all of 
my translation is carried out by someone of the nationality that is required. 
Therefore I always have interpreters on hand in places such as Spain, France, 
Germany, etc who work for me to ensure that nothing gets lost/added in 
translation!

This is just one way of doing it, I am very interested in this discussion as I 
would like to try any new ideas/suggestions for improving this.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203967
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to