I wouldn't use a table for each culture, I think that will certainly complicate things. Instead, take a look at one of these solutions:
http://ayende.com/Blog/archive/2006/12/26/LocalizingNHibernateContextualParameters.aspx http://www.nablasoft.com/Alkampfer/?p=44 http://fabiomaulo.blogspot.com/2009/06/localized-property-with-nhibernate.html http://www.webdevbros.net/2009/06/24/create-a-multi-languaged-domain-model-with-nhibernate-and-c/ There might be more, I got these from googling "localization nhibernate" On Jul 15, 7:46 am, christi roselin <[email protected]> wrote: > Hi, > > I'm developing an application that involves localization. There are > some strings in the system that needs to be stored in the database for > each of the languagues chosen for the application. > > At the relational model I have come up with a table for each of the > language and each such table has the same number of columns i.e an int > primary key column and a string column in that language. > > At the Object level I want to come up with a single class that can be > used to point to only one table at runtime based on the culture, so > that i dont have to create multiple classes for each localized table. > > So, Is there a possibility to create a single class and change the > active record custom attribute that indicates the table name, at > runtime? > > On the Castle Active Record forum, I had earlier got a reply for the > same question and was indicated to use the > ActiveRecordStarter.ModelsCreated event as explained in the link > below,http://stackoverflow.com/questions/588360/table-prefix-using-castle-a... > > But, I still have a technical problem with this kind of > implementation. > This event is raised only when a ActiveRecordStarter.Initialize is > done. > > In my application, multiple threads with differnet cultures make a > request and for each culture static data has to be populated for which > Re-Initilization of ActiveRecord has to be done. > > How to make this appraoch as Thread-safe and concurrent? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
