Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Schema localization

0 views
Skip to first unread message

RaniW

unread,
Dec 30, 2009, 3:57:01 AM12/30/09
to
Hi,
I am trying to find out the best way to localize my Schema.
the problem is that i have many table with allot of columns that need to be
locolized to un known number off languages.

does any knows off a good artical or "best practice" for locolization

--
Thank''''s

Rani W

Uri Dimant

unread,
Dec 30, 2009, 4:29:11 AM12/30/09
to
RainiW
What do you mean by 'localize schema'?


"RaniW" <Ra...@ezface.com> wrote in message
news:C0CE1022-5005-4319...@microsoft.com...

Erland Sommarskog

unread,
Dec 30, 2009, 4:39:16 AM12/30/09
to
The way we do it in our system is that we have specific name tables.

Say that you have a Products table with a ProductName column. To that we
would add ProductNames with the columns ProductID, LangaugeID and
ProductName, of which the first would be the key.

The languages are defines in the Languages table, and the ID are taken
from Windows, using the major id only, so English is 9, Swedish is 29 and
so on.

Queries then goes:

SELECT ... ProductName = coalesce(PN.ProductName, P.ProductName) ...
FROM Products P
LEFT JOIN ProductNames PN ON PN.ProductID = P.ProductID
AND PN.Language = @current_language

That is, there is still is a name column in the main table, and this
column duplicates the name in the main language of the system. In this
way we can ascertain that we always return a name, even if there is none
defined in the current language.

There are a few situations where this is slightly more complicated, and
we have a three-step search for the name. In most cases the language is
determined by the current user, but we also produce reports that are sent
to end customers. In this case, we use the language on the address. In
this case, the preference order is:

1) The customer's language.
2) The default language for customers (i.e. English)
3) The system language (often Swedish or Finnish)

In the end what matters are your business requirements, but this outline
might give you some ideas.

--
Erland Sommarskog, SQL Server MVP, esq...@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

0 new messages