Multilingual Properties

Posts   
 
    
PPabich
User
Posts: 2
Joined: 30-Nov-2005
# Posted on: 30-Nov-2005 17:04:02   

Hajo,

is it possible to define multilingual properties? For example in data base there will be set of columns, one per culture like DishName_de DishName_ie etc. Something similar to that:

http://www.x-tensive.com/Products/DataObjects.NET/Overview/Benefits-Web.htm#_Toc117351318

cheers

Pawel

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 01-Dec-2005 04:26:28   

PPabich wrote:

Hajo,

is it possible to define multilingual properties? For example in data base there will be set of columns, one per culture like DishName_de DishName_ie etc. Something similar to that:

http://www.x-tensive.com/Products/DataObjects.NET/Overview/Benefits-Web.htm#_Toc117351318

cheers

Pawel

Pawel,

Are you locked into that database design? The design your proposing limits the number of languages your application can support to the number of language columns you add.

If possilbe, you might consider something along these lines as an alternative:

Part PartId (PK) PartCategoryCd

PartLanguage PartId (PK) LanguageCd (PK) PartDescription

This design alows your language support to be customized and expanded as needed. You can then extend the Part entity adding a PartDescription property that pulls the correct row from PartLanguage based on the current application culture or language setting.


I'm not sure I quite understand your original question. If the database already has column data for each language then you won't need to add properties to an entity. Unless you looking to add a method that retrieves the correct language column based on the current applicatoin culture/language setting. That is definitely doable.

If you haven't already, take a look at the LLBLGen Pro programmer's guide and read these two sections:

Generated code - Extending the framework through inheritance, Adapter Generated code - Adding your own code to the generated classes

Please let us know if you need additional assistance.

PPabich
User
Posts: 2
Joined: 30-Nov-2005
# Posted on: 01-Dec-2005 10:36:10   

Thanks,

that should be ok

Pawel