I’m building a website which will have a Spanish and Italian version.
In the past, when building a site which must be available in different languages, I’ve created a SQL Table like follows:
dbo.News
--------
ID int
EnglishTitle nvarchar(200)
SpanishTitle nvarchar(200)
ItalianTitle nvarchar(200)
EnglishContent nvarchar(max)
SpanishContent nvarchar(max)
ItalianContent nvarchar(max)
Then, depending on a query string (domain.com/NewsArticle.aspx?id=123&l=es) I would do something like:
Select Case Request.QueryString("l")
Case "en"
TitleLtl.Text = "SELECT EnglishTitle..."
Case "es"
TitleLtl.Text = "SELECT SpanishTitle..."
Case "it"
TitleLtl.Text = "SELECT ItalianTitle..."
End Select
However, I’ve found this really time consuming (especially if the client later asks for another language option as a second phase).
What is the best practice for doing something like this, allowing scope for extra languages?
I’m open to VB.NET and C# solutions, Cheers!
Simply read some articles, start from here:
ASP.NET Globalization and Localization
there are many features of .NET and ASP.NET to help you in localize and globalize your site without such time consuming and home-made solutions like yours above…