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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:37:46+00:00 2026-05-11T15:37:46+00:00

I have status tables in my database, and localised tables that contain language-specific versions

  • 0

I have status tables in my database, and ‘localised’ tables that contain language-specific versions of those statuses. The point of the main status table is to define the status ID values, and other meta-data about the status. The ‘localised’ table is to display the text representation in a UI, according to the users’ preferred language. Here is an example schema:

create table [Language] (     ID smallint primary key,     ISOName varchar(12) )  create table EmployeeStatus (     ID smallint primary key,     Code varchar(50) )  create table EmployeeStatusLocalised (     EmployeeStatusID smallint,     LanguageID smallint,     Description varchar(50),     constraint PK_EmployeeStatusLocalised primary key         (EmployeeStatusID, LanguageID),     constraint FK_EmployeeStatusLocalised_EmployeeStatus foreign key          (EmployeeStatusID) references EmployeeStatus (ID),     constraint FK_EmployeeStatusLocalised_Language foreign key         (LanguageID) references [Language] (ID) )  create table Employee (     ID int identity(1,1) primary key,     EmployeeName varchar(50) not null,     EmployeeStatusID smallint not null,     constraint FK_Employee_EmployeeStatus foreign key         (EmployeeStatusID) references EmployeeStatus (ID) ) 

This is how I’d typically access that data:

select e.EmployeeName, esl.Description as EmployeeStatus from Employee e inner join EmployeeStatusLocalised esl on     e.EmployeeStatusID = esl.EmployeeStatusID and esl.LanguageID = 1 

I’m not really happy that my LINQ to SQL is doing things in the most efficient way, though. Here’s an example:

using (var context = new MyDbDataContext()) {     var item = (from record in context.Employees                 select record).Take(1).SingleOrDefault();      Console.WriteLine('{0}: {1}', item.EmployeeName,         item.EmployeeStatus.EmployeeStatusLocaliseds.             Where(esl => esl.LanguageID == 1).Single().Description); } 
  • 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. 2026-05-11T15:37:47+00:00Added an answer on May 11, 2026 at 3:37 pm

    Personally, I’d probably leave the EmployeeStatus codes in the DB and move all localization logic into the client. If this is a web app (ASP.NET or ASP.NET MVC) then you’d use the the EmployeeStatus code as a key into a resource file, and then use UICulture=’Auto’ and Culture=’Auto’ to tell ASP.NET to pick up the right resources based upon the ‘Accept-Language’ HTTP Header.

    You’d provide default (culture insensitive) resources embedded in your app, and allow satalite assemblies to override the defaults where they needed.

    The problem, for me, with adding localization into the DB is that you firstly end up with much more complicated queries, you have to keep pumping the locale into each of these queries, and you can’t cache the outputs of the queries so widely. Secondly, you have a mixure of tables that hold entities and tables that hold localization. Finally, a DBA is required to do the localization.

    Ideally you want someone who understands how to translate text to do the localization, and for them to use some tool that they’re comfortable with. There are plenty of .resx tools out there, and apps that allow language experts to ‘do their thing’.

    If you’re stuck with DB tables for localization because ‘that’s how it is’ then perhaps you should query the lookups seperately to the real data, and join the two at the UI. This would at least give you an ‘upgrade path’ to .RESX in the future.

    You should check out Guy Smith-Ferrier’s book on i18n if you’re interested in this area:

    http://www.amazon.co.uk/NET-Internationalization-Developers-Guide-Building/dp/0321341384/ref=sr_1_1?ie=UTF8&s=books&qid=1239106912&sr=8-1

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

Sidebar

Related Questions

I have an application that has a status table see Database best practices -
I have a table in my database that holds status names and descriptions (called
i have a table in sqlite database like following. id status ============= x 0
I have the following table in my postgreSQL 8.3.14 database timestamp status 2012-03-12 19:15:01
i have 2 tables, users and follows. table follows has a column named status.
I have a database with 2 tables that I am working with (SugarCRM). I
Let's say I have a MySQL database with 3 tables: table 1: Persons, with
I have a MySQL database with two tables (simplified for this question): movies table
I have two tables in my database as following: Suggestions Table: ID, Title, Description,
I have a database that have two tables. The sql query fetching data correctly.

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.