Greg Brown said the following on 5/23/2006 5:40 PM:
Master P,
 
There's a list for MachII on CFC Dev?  I'll have to check that out.
Actually, it's at Topica (It's the official Mach-II list as well):
http://lists.topica.com/lists/mach-ii-coldfusion/read
anyways... so the goal of this is to prepare or load a properties file that is then used by a resource bundle in the view.  if i can build it into the plugin i have the plugin load the bundle for that view and i don't have to repeat myself in every view.  then all i need to do in my views is rb.getString("stringName").  i'm aware of the connection to the framework but I'm okay with this minor connection as it's easily implemented elsewhere.
 
right now i have a function in all the views to get the localized information.
<cfset localizeView(arguments.viewName) />
 
the preView seems ideal.  what do you think?  any other solutions that would be more ideal in your opinion?
Just trying to figure out why you need the view name?  Are you display some views that would be english and other that would a different language (meaning you have multiple views being put together in a single request)?  Usually, I would suspect that the whole request is going to be in a certain locale and not switching the locales based on which view is being used.

Matt and I loading the rb bundles on the preEvent plugin point in one of plugins for MachBlog.  This is all done through a facade which is being managed by ColdSpring, but there is also a reference that we set in the Mach-II properties.  All be have to do is something like this when we need a resource bundle resource:

#getProperty("resourceBundleFacade").getResourceBundle().getResource("more")#

Although we're dealing we one locale per blog which can be changed.  I don't see why you can't inject the required RB into the event object in the preview if it's missing - all based on the locale being served.  Just still trying to figure out why you need to know the view name in order to serve the correct locale RB.  Maybe you can post your localizeView function?  So I can see what info it is giving you - that way I might get better insight into this.
thanks in advance for your thoughts.
 
-greg
 
btw.  love the cfweekly.  good stuff.
Thanks about the ColdFusion Weekly.  All I can say is that the best kudos Matt and I can receive is a call for the query, quiz or listener feedback.  Call us! Don't be shy... ;-)

HTH,
.Peter
-- 
Peter J. Farrell - Maestro Publishing
Certified Adobe ColdFusion MX7 Developer
Member Team Mach-II and Team Fusion
--
Co-Host of the ColdFusion Weekly Podcast
The "Virtually Live" Call-In Show
http://www.coldfusionweekly.com



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