If we are going to localize content so we can retrieve SAME content item in different languages what would be the best practice?
One solution is to put localized content into separate class (table):
public class Category
{
public Guid ID {get;set;}
private CategoryContent GetOrCreateCurrentCultureContent()
{
// return (and create if not exists)
// instance of CategoryContent regarding to current culture
}
// encapsulate content properties
public string Title {
get {
return GetOrCreateCurrentCultureContent().Title;
}
set {
GetOrCreateCurrentCultureContent().Title = value;
}
}
public class CategoryContent
{
public string Title {get;set;}
...
}
Any better idea?