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 824275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:04:39+00:00 2026-05-15T03:04:39+00:00

I may have to store some i18n-ed data in my database using XML if

  • 0

I may have to store some i18n-ed data in my database using XML if I don’t fight back. That’s not my choice, but it’s in the specifications I have to follow. We would have, by example, something like following in a ‘Country’ column:

<lang='fr'>Etats-Unis</lang>
<lang='en'>United States</lang>

This would apply to many columns in the database.

I don’t think it’s a good idea at all. I tend to think that a cell in a database should represent a single piece of data (better for look-up), and that the database should have two dimensions maximum and not 3 or more (one request more would be required per dimension / a dimension here would be equal to the number of XML attributes).

My idea was to have a separate table for all the translations, with columns such as : ID / Language / Translation. However, I should admit that I’m really not sure what is the best way to store data in various languages in a DB…

Thanks for your advices 🙂

  • 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-15T03:04:39+00:00Added an answer on May 15, 2026 at 3:04 am

    Agree with your vision of thinking.

    In a previous project, we did the same thing (stored I18N values in DB), in addition to traditional I18N (resource files in solution).

    The reason for this was for special dynamic data (not static strings) that required translation. We had sports – such as “Soccer” which needed to be translated to their language-specific description.

    To do this, we had a simple lookup table, with columns (LCID - int, SportID - int, Description - nvarchar(256)).

    The stored procedures/functions accepted the locale as an integer (e.g Spanish – 3082), then the SQL would return the appropriate culture-sensitive description based on the locale. This way the web server code had no knowledge of this behind the scenes.

    So you might have the following few rows:

    Lcid       SportID      Description
    3081       1            Soccer
    3082       1            Futbol
    

    Then you simply join on this table in your SQL to facilitate the I18N.

    The small drawback of this method though is that your SQL SP’s will require the LCID as a parameter from the web server code.

    The Sports were updated/imported via an excel sheet bulk import, that’s why we needed the I18N in the DB.

    This is the only way i can envision DB-based I18N from occuring.

    • 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.