Hi

I would recommend taking a look at .properties-Files as used in Java. Paul
Hastings made a neat CFC to handle those Files:
http://www.sustainablegis.com/unicode/resourceBundle/javaRB.cfm.

Benorama uses a similar approach in his MVC best practices tutorial: 
http://www.benorama.com/coldfusion/patterns/part5.htm

If you're going this way and use Eclipse as well, then i recommend
installing the Eclipse Resource Bundle Editor from
http://www.resourcebundleeditor.com/ess/rbe/home.do as it makes maintainig
the .properties-Files much easier.

Regards
Raphael Gerber

-- 
codeyard web development
http://www.codeyard.ch  

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Baz
Sent: Sunday, December 18, 2005 7:10 AM
To: [email protected]
Subject: [CFCDev] CFC that reads XML



Hi,

If you were implementing multiple languages and wanted to store all your
text in multiple XML files (English.xml, French.xml, etc.) and each XML file
had a structure like this:

<root>
  <resource name="ContactUs.PageTitle">Contact US</resource> 
  <resource name="ContactUs.BodyTitle">Feel free to contact us</resource>
  ...
</root>

Would you create 1 CFC that loads the appropriate language file, and
contains a getter FOR EACH text element (hundreds of getters)? Or would you
make 1 generic getter that takes as an argument the full resource name?

Is this generally a good way to go about implementing multiple languages?

Cheers,
Baz


 



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to