Yes Tony, exactly as I do it (with the exception of the application.cfc, not got round to using that yet!), works like a charm! :-)
________________________________ From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: Thu 21/04/2005 20:03 To: CF-Talk Subject: Re: translating websites i did the same exact thing, but rather than do the lookups/translations all the time, i do it once onApplicationStart (using the new application.cfc) read the translations into memory, and then whenever i need to display a label i make that call to the application variable structure that is the locale the user has selected. and just like andy, i have an english.xml and a spanish.xml, and could add any others to the mix. and rick... its as simple for me as... <labels> <one>Hello</one> </labels> and then a corresponding spanish one... <labels> <one>Hola</one> </labels> ..... tony On 4/21/05, Rick Faircloth <[EMAIL PROTECTED]> wrote: > Not just in reference to language XML...but do you have something > that generates the XML for you or do you have to type out > the XML pages yourself? > > Rick > > ---------------------------------------- > From: "Adkins, Randy" <[EMAIL PROTECTED]> > Sent: Thursday, April 21, 2005 2:10 PM > To: CF-Talk <cf-talk@houseoffusion.com> > Subject: RE: translating websites > > XML works just as fine. I did not decide to do a database table > for the translations. Might have been better but it works just > as good. > > -----Original Message----- > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 21, 2005 1:50 PM > To: CF-Talk > Subject: RE: translating websites > > Sounds good...but why the XML files? Why not just translate the text and put > the translated phrases / sentences / paragraphs into a database and call them > out according to specified language? > > Rick > > ---------------------------------------- > From: "Adkins, Randy" > Sent: Thursday, April 21, 2005 1:41 PM > To: CF-Talk > Subject: RE: translating websites > > What I did was replaced all my DISPLAYED TEXT as variables And have a file > with all the variables setup for the given language. > > Such as: > If the locale is Spanish, then it calls the es-es.cfm file with all The > Spanish Translations. > > If the locale is English, then it calls the en-us.cfm file with all The > English Translations. > > This way I maintain ONE website and 2 language files. > > -----Original Message----- > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 21, 2005 1:29 PM > To: CF-Talk > Subject: RE: translating websites > > Hi, Andy... > > I had a client ask about year ago if something like this could be done > without creating multiple sites, each in a different language. I couldn't > think of a way to do it. > > Seems like you've solved the problem nicely. > > Would you mind sharing some of your code / files / techniques...perhaps a > small sample of how you do it? > > Unfortunately, I know very little about using XML, although I've read some > about it, and haven't used it before. > > Any insight you'd be willing to give would be much appreciated! > > A first question would be...why would involving XML be helpful? Why not just > have someone do that translations and put them into a database? > > Thanks, > > Rick > > ---------------------------------------- > From: "Andy Mcshane" > Sent: Thursday, April 21, 2005 1:03 PM > To: CF-Talk > Subject: RE: translating websites > > I have done exactly this using XML. All of the English text that appears on > my site is held within tables in a SQL database. I have a Coldfusion > interface for these tables that allows access to this text for translating > into any language that I choose. From this same interface I then generate XML > files for each language using the following naming convention, English.xml, > Spanish.xml, etc. In my coldfusion page, where I want to display the relevant > text I place a call to a translate function which does a search of the XML > file that I specify and returns the appropriate text. This means that I have > only one Coldfusion page that can be seen in many different languages. It is > a little more complex than I have stated here but this is one method to do > it. My site is a multi-lingual site and I display the required text based on > the language that a user specifies. The only drawback that I have so far > found with this method is that you sometimes get your text display screwed up > depending on t he size of the translated text, but this is a very small > problem indeed, but I would suggest XML as a good solution to your > requirements. > ________________________________ > > From: Coleman, Brian [mailto:[EMAIL PROTECTED] > Sent: Thu 21/04/2005 17:32 > To: CF-Talk > Subject: translating websites > > I don't know if CF has any native way to do this, but the company I work for > is looking for a way to translate the website to Spanish. > Surely you wouldn't have to do a page for page translation? > If anyone has worked with doing this sort of stuff, let me know. > > Thanks, > Brian > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203902 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54