Hi, thanks for replying..
I will study the way you implement the default resource source (.resx) and I think it will be very interesting to implement this functionality that I found so useful. "...you need to create a class that implements IResourceFactory and then register it with the container..." I see no configuration is required when using the localization based on .resx files. With that words do you mean, to create an entry in the web.config to override the default behaviour? Hope I can accomplish this because I need it Regards. ----- Original Message ----- From: "John Simons" <[email protected]> To: "Castle Project Users" <[email protected]> Sent: Tuesday, December 29, 2009 6:42 PM Subject: Re: MR - Filters To do this properly it is a bit of work. You pretty much have to write your own ResourceAttribute, eg ResourceDBAttribute, that implements IResourceDescriptorBuilder. You also need to replace the default Monorail services that loads resources from resx to instead load from a db, to do that you need to create a class that implements IResourceFactory and then register it with the container. The best way to go about doing all this is to have a look at the existing implementation on the trunk. If you do chose to go this way, please do post your solution in the contrib repository. Cheers John On Dec 30, 4:01 am, "[email protected]" <[email protected]> wrote: > Hello, > > I need to localize a web site built with MonoRail. > > I've studied the localization that comes with the documentation > (http://www.castleproject.org/monorail/documentation/trunk/usersguide/ > res_localization.html) > > The point is, this utilize .resx files, and I do not want to use .resx > files because my clients requires me the ability to create new > languages and to modify the existing ones in run time from a web > interface. > > So, I've been investigating and I found that asp.net has a mechanism > that allows you to load localized string from another source (such a > database for instance, which I am interested) > > Here (http://msdn.microsoft.com/en-us/library/aa905797.aspx) you can > find a good information about this. That information works only for > asp.net controls and I am required to use it in MonoRail. > > I've thought in using filters for this, I mean, load all the data into > a propertybag variable and use it in the view. Do not know if it is > correctly to use it in this way. > > Can any of you help me with this? > > Slts -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en.
