> >>I suppose I could set a language session variable
> Yeah, better than in a database. Use text files with lines
> of text, one
> file for English, one for French.
> However, just put the language in the session variable,
> ie. the index of
> the language, and put all strings
> in an array in an Application variable.
Structure... use a structure... much better to have
application.languages.fr["stringname"]
than to have
application.languages[2]["stringname"]
or even
application.languages[fr]["stringname"]
either of the latter will at some point be more problematic than using
a structure.
I'd recommend wrapping the reference to the application variable in a
function call also...
as an example:
function getText(stringname) {
return application.languages[session.language][stringname];
}
Or throw that into a CFC that can be used for display on every page:
<cfset lang = application.lang>
<cfoutput>#lang.getText("stringname")#</cfoutput>
s. isaac dealey 954.522.6080
new epoch : isn't it time for a change?
add features without fixtures with
the onTap open source framework
http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:211147
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