Thursday, August 14, 2008 6:37 PM
I am working on domain where I need to support the ability to translate content. Such as a product description. I am imagining that the domain model might look something like:
product.Description = "Widget";
product.Translation[Language.English].Description = "Tegdiw";
or
product.Description = "widget";
product.Description[Language.English] = "tegdiw";
or
IProduct product = repository.Get(1, English);
product.Description = "wow";
IProduct productZh = repository.Get(1, Chinese);
productZh.Description = "waw";
Of the three I have presented here, I think I like number one the best. I would say that I like it the most because I have done this model before and it seemed to work well, I am just wondering how much I really care that it forces me to have 2 tables per entity that I want translations for (Product and ProductTranslations). Really that's not that bad I guess. Anyways, I wanted to put my thoughts out there to see if anyone else had some better ideas. :)