> How do you accomplish that? By putting them
> into an "application variable structure" like the
> one you mentioned below?
here is the code that i use in my onApplicationStart()
<!--- read the xml file with labels write it to a request scope
var --->
<!--- do this one time for english... once done with english,
run it
for spanish. --->
<!--- this reads the english xml doc. --->
<cffile action="read"
file="#rootFilePath#inc_labels_english.xml"
variable="i18nLabels">
<cfset request.i18nLabels = xmlParse(i18nlabels)>
<!--- initialize the label set --->
<cfset application.labels = structNew()>
<!--- initialize my locale sets --->
<cfset addToMyStruct =
structInsert(application.labels,"english",structNew(),"yes")>
<cfset addToMyStruct =
structInsert(application.labels,"spanish",structNew(),"yes")>
<!--- add to my english bundle --->
<!--- this loops one time for each line of the xml document, if
i
can find out how to calculate the number of nodes in the
xml document, i can easily write that to the place where i have
a
number hard coded... --->
<cfloop from = 1 to = 150 index = i>
<cfset addToMyStruct =
structInsert(application.labels.english,lcase(numberAsString(i)),xmlSearch(request.i18nLabels,"/labels/#lcase(numberAsString(i))#"),"yes")>
</cfloop>
<!--- read the xml file with labels write it to a request scope
var --->
<!--- do this one time for english... once done with english,
run it
for spanish. --->
<!--- this reads the spanish xml doc --->
<cffile action="read"
file="#rootFilePath#inc_labels_spanish.xml"
variable="i18nLabels">
<cfset request.i18nLabels = xmlParse(i18nlabels)>
<!--- add to my spanish bundle --->
<!--- this loops one time for each line of the xml document, if
i
can find out how to calculate the number of nodes in the
xml document, i can easily write that to the place where i have
a
number hard coded... --->
<cfloop from = 1 to = 150 index = i>
<cfset addToMyStruct =
structInsert(application.labels.spanish,lcase(numberAsString(i)),xmlSearch(request.i18nLabels,"/labels/#lcase(numberAsString(i))#"),"yes")>
</cfloop>
--
tony
Tony Weeg
macromedia certified coldfusion mx developer
email: tonyweeg [at] gmail [dot] com
blog: http://www.revolutionwebdesign.com/blog/
cool tool: http://www.antiwrap.com
"...straight cash homey"
- randy moss, now a raider
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:203890
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54