c# - .NET localization -
I am developing an application that supports multiple locations.
It is done through a different DLL, a resource for each language, each resource stores the translation of the string for a specific language.
This is working just fine on the WPF application, every time the string is required on the app, a request is made to Dell and it returns the text according to the selected language on the app. If the language is changed then the language shows the change in text returns from DLL.
Now I am making a website with ASP.NET in MVC, which uses the same language DL.
The problem is that Resource Manager, which I can understand at Language DLL, always returns text for system culture. I've changed the culture used by the resource manager, but it does not work. / P> Do anyone have an idea on how I can solve this? Thank you UPDATE: Sorry for the late reply, access to the Internet during weekends ... This is the first time that I have a project that uses the same DLL for both web and windows And I expect this to happen, but it is not so. Actually I have a global class that stores users and app settings, since then there is a current CultureInfo, when the user changes it, the language manager update is the current culture input variable. When I call the code to bring the string to the language, resmgr.GetString (label, ci); Where resmgr is the ResourceManager object, language manager, CI is the cultureInfo object and labeled the string I want to receive, it returns the text for the label / language I have every culture Is a rhesix file that supports the project and is one of the irreversible / default works fine in the Windows application, but on the web and in some unit tests which I I can not change the CI value, the result for a new culture is always the same, the strings from the irreversible culture I tried to change the current thread culture and current UI culture but it is not working < P> Update 2: The resource manager method GetResourceSet gives the right resources for the cultures that pass into a WPF application but the unit tests or the same in the web D unchanging process I'm missing something Just do not know how it is .... 3 Updates: Because of IOC, we do not have language port context, but when this compilation is complete Then it is copied to the folder, I found that the folder units created for each resource were not copied to the test debug folder and the website bin folder. I correct it and now the file is being copied but the problem persists. Check it out, as it is a very detailed topic.
Comments
Post a Comment