On 12/17/05, Baz <[EMAIL PROTECTED]> wrote:
> 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?

A "generic getter" (although frankly I don't consider that a getter -
the CFC represents a dictionary and the method is a lookup of a given
term).

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

It's probably one reasonable way to do it. Depends on what your
application does / needs really... For example, macromedia.com apps
use groups of translated terms and load them by group and language
from a database and then the group (a struct) is used to reference
individual terms (matching your example we might load a "ContactUs"
group and get a struct and then just do contactGroup.PageTitle,
contactGroup.BodyTitle etc).
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


----------------------------------------------------------
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