Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Db for multilanguage

Db for multilanguage

Scheduled Pinned Locked Moved Database
databasesql-serversysadminquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mehrdadc48
    wrote on last edited by
    #1

    Hi, I'm developing a multilanguage web site.(My DB is SQL Server 2008 R2) Some of its languages are: Chinease, Japanesae, Arabic, Persian, English .... I know about some collation and datatypes in SqlServer, but I'm ambigious about Collation of DB and about char types. 1. What collation I shoud use for my DB? 2. for char types I shoud use varchar or nvarchar? Thanks for your attention.

    Best wishes

    L 1 Reply Last reply
    0
    • M mehrdadc48

      Hi, I'm developing a multilanguage web site.(My DB is SQL Server 2008 R2) Some of its languages are: Chinease, Japanesae, Arabic, Persian, English .... I know about some collation and datatypes in SqlServer, but I'm ambigious about Collation of DB and about char types. 1. What collation I shoud use for my DB? 2. for char types I shoud use varchar or nvarchar? Thanks for your attention.

      Best wishes

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Mixing cultures in a database are a recipe for severe headache's.

      mehrdadc48 wrote:

      What collation I shoud use for my DB?

      The appropriate one for the required sort-method (binary or dictionary? case sensitive, or not?) for the language, they're listed here[^].

      mehrdadc48 wrote:

      for char types I shoud use varchar or nvarchar?

      NVARCHAR, NTEXT and/or NCHAR. Important note;

      Windows Unicode-only collations can only be used with the COLLATE clause to apply collations
      to the nchar, nvarchar, and ntext data types on column-level and expression-level data; they
      cannot be used with the COLLATE clause to change the collation of a database or server instance.

      Says so here[^]. That page also mentions that there's three different levels where you can manage your collations. I'd like to suggest that you append the collation that's required by the current UI to the query. Are you also going to store dates from regions where they speak those languages? If that's the case, you'd also need to check whether the datatimes in the database are all stored in the same timezone (using server-time!) or the local users' time. The latter should be entered in the database re-adjusted to the timezone of your server, or, alternatively, stored the timezoneinformation in an accompanying field. That should be enough to get you up and running. Enjoy :)

      I are Troll :suss:

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups