I intended it the other way, so you'd have
#request.language.welcomeMessage# all over the place. But you're
right, rolling it up in a CFC is definitely the way to go. And with a
CFC, it's much easier to do load-on-demand so the XML is only loaded
on the first request that needs it, rather that just doing both on the
first request.
I seem to recall some libraries for doing this stuff being made
available a while back? Perhaps I'm crazy?
cheers,
barneyb
On 6/23/05, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> Could be heavy to load them both at once... may not necessarily
> matter, it depends on the traffic and the server...
>
> I would recommend if you're going to reference application structures
> like this that you use a function or a CFC to return the appropriate
> strings from those structures instead of referencing them flatly ...
> i.e. instead of this:
>
> #application.language[request.language].welcomeMessage#
>
> It is probably better to use
>
> #application.textManager.getText("welcomeMessage")#
>
> This way if you need to make changes to the method or to the CFC
> internally, you don't later have hundreds of flat references to the
> structure in your application that would need to be replaced.
>
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I have 50 invites.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210449
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