Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 525715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:42:03+00:00 2026-05-13T08:42:03+00:00

I want my database to support multi Languages for all text values in its

  • 0

I want my database to support multi Languages for all text values in its tables.

So what is the best approach to do that?.

Edit1::

E.G.

I’ve this “Person” table:

ID int
FirstName  nvarchar(20)
LastName   nvarchar(20)
Notes      nvarchar(max)
BirthDate  date
...........

So if i want my program to support new language “let say French”.

should i add new column every time i add new language ?
So my “Person” table will look like this

ID int
FirstName_en  nvarchar(20)
FirstName_fr  nvarchar(20)
LastName_en   nvarchar(20)
LastName_fr   nvarchar(20)
Notes_en      nvarchar(max)
Notes_fr      nvarchar(max)
BirthDate     date
...........

Or should i add 2 new tables one for languages and other for “Person_Languages” values ?

So this will look like :
” Languages ” table:

ID           int
Lang-symbol  nvarchar(4)

” Person ” Table:

ID         int
BirthDate  Date

and finally ” Person_Translation ” table:

LangID        int
PersonID      int
Translation   nvarchar(max)

Or there is something better ??

.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:42:03+00:00Added an answer on May 13, 2026 at 8:42 am

    I have had to deal with this in a questionaire database. Multiple questionaires needed to be translated in multiple languages (English, Japanese, Chinese).

    We first identified all text columns that would be printed out on the questionaires. For all these we would need to be able to store a translation. For each table having text columns that would require translations, we then created a _translations table, having a foreign key to point to the primary key of the original table, a foreign key to our language table, and then a unicode column for each text field that would require translation. In these text columns we would store the translations for each language we needed.

    So a typical query would look like:

    select     p.id
    ,          pt.product_name
    ,          pt.product_description
    from       product                  p
    inner join product_translations pt
    on         p.id = pt.product_id
    and        'fr' = pt.language_code
    

    So, always just one join extra (for each table) to obtain the translations.

    I should point out that we only had tto deal with a limited amount of tables, so it was not a big issue to maintain a few extra %_translations tables.

    We did consider adding columns for the new language, but decided against it for a coouple of reasons. First of all the number of languages to be supported was not known, but could be substantial (10, 20 languages or maybe more). Combined with the fact that most tables had at least 3 distinct human readable columns, we would have to add many, many text columns which would result in very wide rows. So we decided not to do that.

    Another approach we considered as to make one big “label” table, having the columns:

    ( table_name
    , id_of_table
    , column_name
    , language_id
    , translated_text)

    effectively having one table to store all translations anywhere in the database. We decided against that too, because it would complicate writing queries (as each ‘normal’ column would result in one row in the translation table, which would result in effectively joining the already large translation table multiuple times to the normal table (once for each translated column). For your example table you would get queries like this:

    select     product.id 
    ,          product_name.translated_text product_name
    ,          product_description.translated_text product_description
    from       product p
    inner join translations product_name
    on         p.id = product_name.id
    and        'product'      = product_name.table_name
    and        'product_name' = product_name.column_name
    and        'fr'           = product_name.language
    inner join translations product_description
    on         p.id = product_name.id
    and        'product'      = product_description.table_name
    and        'product_description' = product_description.column_name
    and        'fr'           = product_description.language
    

    as you can see, essentially this kind of like an entity-attribute-value design, which makes it cumbersome to query.

    Another problem of that last approach is that it would make it hard if not impossible to enforce constraints on translated text (in our case mainly unicity constraints). With a separatee table for the translations, you can easily and cleanly overcome those problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.