469,273 Members | 1,878 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,273 developers. It's quick & easy.

Support for Spanish and English language

Hi,
I have a database and want to store data in Spanish and English. To
accompish this:

1. Do i need to create separate tables for both the languages like
items_en and items_sp?

2. If I opt for the UTF16 charset what single collation setting can I
use?

Thanks and Regards
Jackal Hunt

Feb 20 '07 #1
1 2963
(ja************@yahoo.com) writes:
I have a database and want to store data in Spanish and English. To
accompish this:

1. Do i need to create separate tables for both the languages like
items_en and items_sp?
It's impossible to answer without more knowledge about your requirements
and what sort of data we are talking about. But seprate tables does not
sound like a good idea.

One upon a time, our tables looked like this:

CREATE TABLE entities (entityid int NOT NULL,
entityname varchar(30) NOT NULL,
entitynamefor varchar(30) NOT NULL,
...

Where "name" was the Swedish name, and "namefor" the English name. But
when we entered the Finnish market, that was not acceptable, so we
switched to:

CREATE TABLE entities (entityid int NOT NULL,
entityname varchar(30) NOT NULL,
...

CREATE TABLE entitynames(entityid int NOT NULL,
languageid smallint NOT NULL,
entityname varchar(30) NOT NULL,
PRIMARY KEY (entityid, languageid))

That is, for every entity we have a look-up table for, there is also
a name table, that holds the name for the various languages. The
main table also has the name in the home language of the system, since
we cannot ensure that the users enters name in all languages that the
system support.

But I have to idea whether this is applicable to your system.
2. If I opt for the UTF16 charset what single collation setting can I
use?
If all you need to support is English and Spanish, you can go with
varchar if you like.

If you need sorting of your data, our scheme with a subtable of the
names is not workable. You can set the collation per column, so you
can have one Spanish column with Modern_Spanish_CI_AS and one
English column with Latin1_General_CI_AS.

In practice, though, it should work just fine to have Modern_Spanish
everywhere, since the effect on English will be miniscule. It's different
if you want to use Traditional_Spanish, where CH and LL sorts as
separate letters; that is not suitable for English.


--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Feb 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by ..... | last post: by
4 posts views Thread by Jim Adams | last post: by
3 posts views Thread by clintonG | last post: by
3 posts views Thread by Chip | last post: by
4 posts views Thread by =?Utf-8?B?Q2hyaXMgRGF2b2xp?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.