Support for Spanish and English language

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jackal_on_work@yahoo.com

    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

  • Erland Sommarskog

    #2
    Re: Support for Spanish and English language

    (jackal_on_work @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(ent ityid 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_Spa nish, where CH and LL sorts as
    separate letters; that is not suitable for English.




    --
    Erland Sommarskog, SQL Server MVP, esquel@sommarsk og.se

    Books Online for SQL Server 2005 at

    Books Online for SQL Server 2000 at

    Comment

    Working...