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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:07:36+00:00 2026-05-27T05:07:36+00:00

-EDIT 2- Figured it out, check my answer. I should stop asking questions on

  • 0

-EDIT 2- Figured it out, check my answer. I should stop asking questions on StackOverflow, I always figure it out a couple of minutes later 🙂

I have the following code (well, roughly, with detection and everything at top):

Manager = new ResourceManager("EM250.Localization.Application", 
                              Assembly.GetExecutingAssembly());

// CurrentCulture being fr-CA in this case
return Manager.GetString(Key, CurrentCulture); 

So, I manage my localization resources using a custom class I made.

I got two files, one called “Application.resx” and another, “Application.fr-CA.resx”. Both are set to “Embedded Resource”. When I compile my code, I get a folder called “fr-CA” with the file “Library.resources.dll” in it. Which is completely fine.

Anyone has an idea why my code is not working? I get English strings everywhere.

Note that is not an ASP.NET project but an actual WinForms project.

-EDIT- Should probably post the rest of the code this is the initialization of my Application:

        String LocaleLoad;

        if(Configuration.GetString("Language") == null)
        {

            // Detect which if the computer is set in french.
            switch(System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName)
            {
            case "fr":
                LocaleLoad = "fr-CA";
                break;

            default:
                LocaleLoad = "en-CA";
                break;
            }

        }
        else
        {

            LocaleLoad = Configuration.GetString("Language");

        }

        // Initialize the localization class.
        Localization.Initialize(LocaleLoad);

And this is my Localization class:

    /// <summary>
    /// Initialize the culture info with the specific culture.
    /// </summary>
    /// <param name="Culture">The culture to load.</param>
    public static void Initialize(string Culture)
    {

        CultureInfo NewCulture = new CultureInfo(Culture);

        if(!(Localization.CurrentCulture == null || CurrentCulture.TwoLetterISOLanguageName == NewCulture.TwoLetterISOLanguageName))
        {

            CurrentCulture = NewCulture;

            Thread.CurrentThread.CurrentCulture = NewCulture;
            Thread.CurrentThread.CurrentUICulture = NewCulture;

            OnCultureChanged();

        }

        Thread.CurrentThread.CurrentCulture = NewCulture;
        Thread.CurrentThread.CurrentUICulture = NewCulture;

        CurrentCulture = NewCulture;

        foreach(Language Lang in ListLanguages)
        {
            if(Lang.DisplayName == CurrentCulture.NativeName)
            {
                CurrentLanguageValue = Lang;    
            }
        }

        Manager = new ResourceManager("EM250.Localization.Application", Assembly.GetExecutingAssembly());

    }

    /// <summary>
    /// Get a single entry from the ressource file.
    /// </summary>
    /// <param name="Key">The value to get from the ressource file.</param>
    public static string GetString(string Key)
    {

        return Manager.GetString(Key, CurrentCulture);  
    }
  • 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-27T05:07:36+00:00Added an answer on May 27, 2026 at 5:07 am

    My Ressource ID wasn’t set properly for my fr-CA file. My en-CA file was set to “EM250.Localization.Application.resources” and the fr-CA was “Library.Localization.Application.fr-CA.resources”

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

Sidebar

Related Questions

EDIT AGAIN ... I'm just a dummy and figured it out! EDIT: So, it
I'm trying to figure out how to check if a string matches a regular
Thanks to inti's code I was able to figure out the answer! jQuery: $(document).ready(function(){
-Edit: Solution Found- Figured it out after some heavy searching - one person (I
EDIT: I'm sorry for making this thread as I've figured out the problem. Here's
Edit: From another question I provided an answer that has links to a lot
EDIT: This was formerly more explicitly titled: - Best solution to stop Kontiki's KHOST.EXE
I have a very basic regular expression that I just can't figure out why
I am trying to figure out the proper way to use NSManagedObjectContexts when you
Can't figure out why my tags aren't showing in the form that is used

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.