By transparent, I mean I shouldn't write join queries for loading localized
tables. I'm doing this by hbm.xml file, the locale table is loaded eagerly
when primary object is loaded.

On Thu, Jan 20, 2011 at 1:29 AM, Gunnar Liljas <[email protected]>wrote:

> How transparent? How should the translations be entered? A fixed set of
> languages (allowing a bit of denormalization)?
>
> /G
>
> 2011/1/19 Dato Popiashvili <[email protected]>
>
>> Yes but I didn't like their solutions. I want localization to be
>> transparent, even when lazy loading fk classes
>>
>>
>> On Wed, Jan 19, 2011 at 1:18 AM, José F. Romaniello <
>> [email protected]> wrote:
>>
>>> Did you read this page?
>>> 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]<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]<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]<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.

Reply via email to