Did you read this page? http://nhforge.org/wikis/howtonh/localization-techniques.aspx
<http://nhforge.org/wikis/howtonh/localization-techniques.aspx>Here are explained all options for localization. 2011/1/18 Davita <[email protected]> > Hi guys > I'm a new to NHibernate. I just started development of my next project > using NHibernate. One of the requirements is that entity classes > should be localized. I'm doing localization the following way: > - Every entity which should be localized is split into 2 table and 2 > entities. For example, I have an entity Service which holds some > information, and another entity ServiceLocale which holds localized > properties, such as Name, description etc. Same goes for tables. > - Service has a protected field which holds a list of ServiceLocales. > ServiceLocale has a property Culture which specifies which language > the object belongs. > - The list of ServiceLocale is loaded eagerly from xml mapping file. > So when Service is loaded from database, all ServiceLocales also is > loaded for this service object. > - Service has public properties, Name and Description. From this > properties, I check what's current culture, load appropriate > ServiceLocale object and return ServiceLocale's Name and Description. > - Service is persisted using a repository. The repository checks saves > or updates the service, and also all of it's ServiceLocale objects. > > So my question is: is there a better way to achieve this kind of > transparent localization via NHibernate? > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.
