<p>A friend of mine is now building a web application with J2EE and Struts, and it's going to be prepared to display pages in several languages.</p>

<p>I was told that the best way to support a multi-language site is to use a properties file where you store all the strings of your pages, something like:</p>

<pre><code>welcome.english = "Welcome!"
welcome.spanish = "¡Bienvenido!"
...
</code></pre>

<p>This solution is ok, but what happens if your site displays news or something like that (a blog)? I mean, content that is not static, that is updated often... The people that keep the site have to write every new entry in each supported language, and store each version of the entry in the database. The application loads only the entries in the user's chosen language.</p>

<p>How do you design the database to support this kind of implementation?</p>

<p>Thanks.</p>

They way I have designed the database before is to have an News-table containing basic info like NewsID (int), NewsPubDate (datetime), NewsAuthor (varchar/int) and then have a linked table NewsText that has these columns: NewsID(int), NewsText(text), NewsLanguageID(int). And at last you have a Language-table that has LanguageID(int) and LanguageName(varchar).
Then, when you want to show your users the news-page you do:
```
```
SELECT NewsText FROM News INNER JOIN NewsText ON News.NewsID = NewsText.NewsID
WHERE NewsText.NewsLanguageID = <<Session["UserLanguageID"]>>
```
```
That Session-bit is a local variable where you store the users language when they log in or enters the site for the first time.