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

  • Home
  • SEARCH
  • 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 8021109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:52:50+00:00 2026-06-04T21:52:50+00:00

I have a SQL-table with three columns: Id, English and Norwegian. Id is the

  • 0

I have a SQL-table with three columns: Id, English and Norwegian. Id is the primary key. In my application I have a flag (EN/NO) to decide which language to use for labels, buttons ++ in the GUI.
The application is now doing a select * everytime the application loads, and the application is looking up all required values at runtime. But instead of loading the whole dataset for every instance, i want to export these values and create a dll so i can store these values locally.

Is there any possibility of creating this in-code so the dll will renew itself with every build? Or do I have to run some external program to dynamically create ex. a .cs code to copy/paste into my class? (I need to be able to re-run the process because rows will be added every time there is a need for a new label/text)

I have so far thought out three solutions on how to structure my export, but no clue on how to export the data:

  1. Preserve the state of the DataTable in a static context and provide help-methods to standardize the way of getting the values out.

  2. Create a class containing each unique ID as method-name, and a parameter to decide which value to return:

    public static class Names
    {
      public static string 12345(string language)
      {
        switch (language)
        {
            case "EN":
                return "Hello";
            case "NO":
                return "Hei";
            default:
                return "Hello";
        }
      }
    }
    
  3. Create a class containing a searchable list for each language with ID as key and the value (as value)

  • 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-06-04T21:52:53+00:00Added an answer on June 4, 2026 at 9:52 pm

    Why don’t you create different resource files for different languages and load the appropriate one depending you the settings. You can do this by using System.Resources.ResourceManager. This article here explains this in detail.

    EDIT: Following SO post also discuss this in detail Best practice to make a multi language application in C#/WinForms?

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

Sidebar

Related Questions

I have a SQL table with three columns (key, id, loglevel). The key column
I have a table in SQL Server 2005 which has three columns: id (int),
I'm using SQL Server 2008 and I have a table with three columns: Length
Given a table that has three columns ID (Primary Key, not-autoincrementing) GroupID SomeValue I
I have a SQL Server 2008 database table with three varchar Columns - Col1,
I have a SQL table with three columns X, Y, Z. I need to
I'm new to php and sql. I have a table with three columns. One
I have a hierarchical (tree structure) SQL Server table TEmployee with following columns Id
I have a join table with three columns. I've tried defining the three models
So I have a table with three columns - col1 , col2 and col3

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.