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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:36:10+00:00 2026-05-25T10:36:10+00:00

I’m developing an application that supports multiple locales. This is done through a separate

  • 0

I’m developing an application that supports multiple locales.

This is done through a separate dll that has a resource for each language, each resource stores the translation of a string to the specific language.

This is working just fine on a WPF application, every time a string is needed on the app, a request is made to the dll and it returns the text acording to the language selected on the app. If the language is changed the text return from the language dll reflects the change.

Now I’m creating a website in ASP.Net with MVC that uses the same language dll.

The problem is that resourcemanager on the language dll, for what I can understand, always returns the text for the system culture. I changed the cultureinfo used by the resource manager, but it doesn’t work.

Does anyone have a idea on how can I solve this?
Thanks

UPDATE:
Sorry for the late reply. No access to the internet during the weekend… This is the first time that I have a project that uses the same dll for both web and windows and I expected the behavior to be same, but it isn’t. Basically I have a global class that stores user and app settings, one of then is the current cultureinfo, when the user changes it, the language manager update is current cultureinfo variable. When I call the code to get the string the language,

resmgr.GetString(label, ci);

Where resmgr is the ResourceManager object of the language manager, ci is the cultureinfo object and label the string that I want to get, it returns the text for the label/language.
I have a resx file for each culture that the project supports and one for the invariant/default
In the windows app works fine, but on the web and in some unit tests that I made it doesn’t, even thou I change the ci value to a new culture the result is always in the same, the string from the invariant culture.
I tried to change the current thread culture and current ui culture but it didn’t work

UPDATE 2:
Why does the resource manager method GetResourceSet returns the correct resourceset for the culture that passing in a wpf application but the same code in unit testing or web returns the invariant resourceset.
I’m missing something just don’t know what it is….

UPDATE 3: Because of the us of IOC and because the language porject is not reference but copied to the folder when it finishes compiling, i found that the folders that are created for each resource weren’t being copy to the unit test debug folder and to the website bin folder. I correct that and now the file are being copy but the problem persists.

  • 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-25T10:36:11+00:00Added an answer on May 25, 2026 at 10:36 am

    Like i sad on update3 the fact that I wasn’t copy the resources dlls for each language made that the website and unit test failed when I tried to get a label, as the resourcemanager didn’t find the correct language, it would return always the invariant string associated to the label. At first the copy of the dlls didn’t seem to work, but after I run “Clean Solution” and “Rebuild Solution” from visual studio the website and unit testing started to work as expected.
    Thanks for all the hints, those were of a big help for me, with then I was able to pin down the problem.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6

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.