Reputation: 33
We have a requirement to develope an application that support multiple languages (English, German, French, Russian) and we know, we can use ASP.NET localization to localize static text of a web form but what would be the approach for data localization of a database in SQL server.
for example my database schema is something like this:
Table-Questions
QID-PK
Question
CreatedBy
Table- Answer
AID-PK
QID- FK
Answer
AddedBy
In the above schema,I want the column "question" from Question table and column "Answer" from Answer table should keep localization value.
How do I achive this.
Upvotes: 0
Views: 5739
Reputation: 15400
Add a Language table:
Add a TranslatedQuestion table:
Likewise, add a TranslatedAnswer table:
This way, of course there is nothing in the data model to guarantee that every question/answer has a transation for a given language. But you can always fall back to the untranslated question/answer.
Upvotes: 3
Reputation: 46425
Add a culture column to the table, then repeat the questions and answers in the culture specific format.
Upvotes: 0