martes, 06 de marzo de 2012 9:14
I want to create a multi-language database in sql azure. I mean my database should store data in different languages. Then a windows phone app will query the database depending on localization.
I would like to know which are the best practices for multi-language database design.
Todas las respuestas
martes, 06 de marzo de 2012 9:53Hello.
I don't dare call it a best practice but it's definitely good way of doing things (as i think).
So, we create two tables for each object. In first table we should store service data (PK, for example) and in the second we should store one record per one language.
Practical example is the best way of illustrating what i mean:
other service fields
ID: int (FK => Thing.ID)
Lang: varchar ("ru-RU", "en-US",etc)
Description: text (description in specific lang)
martes, 06 de marzo de 2012 10:28
Thanks Alexander, I will follow your suggestion for the design.
Regarding to Windows Phone Application, this application invokes operations in a WCF service hosted in Azure and there the queries to the multilingual database are implemented. Now, my doubt is: how does the WP client set the language of the required data?
I mean, each WCF operation should have a parameter defining the language of the required data? Or should be better to create more than one WCF service
depending on the language?
martes, 06 de marzo de 2012 14:38
I have never developed such a thing, but if i'm not mad, WCF uses SOAP. So i suppose you can add optional header to your request using IClientMessageInspector for example.
Or http://wcfextras.codeplex.com/ .
Or http://msdn.microsoft.com/en-us/library/ms730255.aspx .
There are many guides in the internet covering this topic, so try to implement such a solution.
Please write if my answer was useful for you.
miércoles, 07 de marzo de 2012 7:41Thanks Alexander, I'll take a look at the links.
- Editado n.etx miércoles, 07 de marzo de 2012 7:41
miércoles, 07 de marzo de 2012 7:49Okay, please ask if any issues will occur or please report if you will succesfully find a solution.