multilingual - Entity Framework and Multi Language Databases -


I was wondering if there was any best method while using the unit framework with multi-language database? To manage this, my database design is to create a separate table for all my translations:

  [product table] Productive PK named FK Details IDFK [translation table] TextIID PK lingid Translation Text < / Code> 

I'm happy to go with this approach, but I was wondering if there are any features in the unit framework that can help with it? It would be good to be able to be a product unit object, give it a language and then access the name and description fields in the right and correct language.

Thanks, Nick

As someone has asked if I want to I got a proposal, I thought I would add this solution:

I changed the DB schema, so instead of having a table for all the translations for different text types, I have a different ' Text is the table, eg.

PK ProductName reference language in the master language for reference in the product language & lt; Other product fields & gt; [ProductText Table] Product ID PK LanguageEnd PK Product Name Language-Specific Name ProductDescription Language Specific Details

I have many 'text' tables for local language translations for each institution type. Who need it.

Then if I want to access localized data from EF, then I use the following (for example, to get German text):

  Product product = DB . Product . Where (M => m.ProductId == 1); Product Name germanProductName = product.ProductNames (m = & gt; m.LanguageId == "D");  

Hope this helps


Comments