I have a requirement to add an alternative language version of a single article in an ASP.NET MVC project. I currently have a db table called NewsArticle which has the fields ArticleId, Abstract, Headline, BodyText, and ImageUrl. I would like to essentially have an option when authoring a news article that provides the author with a field to enter an alternative langauge version of the article. This alternative content can then be displayed on the news articles view for that particular language through the language-switching control of the site.
Can anyone point me towards the right direction in as far re-designing the existing model to include this requirement?
Managed to get around this by creating two tables for each multilingual object i.e. split NewsArticle into two tables NewsArticleText (with the localized content, one record per language, plus the ISO code of the language) and NewsArticle (with the language-neutral data; ArticleId, ImageUrl, etc.) A third table Languages is created with all the languages used and its ISO code as primary key.
Example:
Querying the db would be based on the language parameter, e.g. the following code returns all English language articles: