Hi,
I'm struggling to get our application show the localized strings from a satellite assembly.
In short what I did:
-we have a WPF desktop application which consists out of a large number of dlls. The strings which should be shown in the GUI are retrieved by the viewModel classes from the resource files which are embedded in their dlls. I persume these embedded resources are the 'Language Neutral' ones. When running the application the strings are shown correctly, no problem.
-to create a satellite assembly I started from one of the .resx files and changed the values of the strings in VisualStudio. Lets say the resulting files was called NewRes.resx.
-Using ResGen a new resource file was generated to hold the translated strings: resgen NewRes.resx <originaldllbasename>.de.resources
-Taking this resource file a new assembly was build to serve as the satellite assembly:
AL /embed:c:/temp/<originaldllbasename>.de.resources,<originaldllbasename>.de-DE.resources /culture:de-DE /t:lib /out:/out:c:/temp/<originaldllbasename>.resources.dll
-next a subdirectory 'de' was created next to the application and the <originaldllbasename>.resources.dll assembly was copied to this directory
-attempts to show the localized strings failed so I changed some code to explicitly set the culture and use that in the ResourceManager:
CultureInfo ci = new CultureInfo("de-DE");
string x1 = <namespaces>.Properties.Resources.ResourceManager.GetString(<resourcestring1>,ci);
-eventhough I see (using ProcMon) the satellite assembly .../de/<originaldllbasename>.resources.dll being loaded, the localized strings don't show.
Any help or suggestion to continue troubleshooting what is going wrong is very welcome since I'm out of ideas how to locate the problem, or what I am doing wrong. Kind regards. Yves
I'm struggling to get our application show the localized strings from a satellite assembly.
In short what I did:
-we have a WPF desktop application which consists out of a large number of dlls. The strings which should be shown in the GUI are retrieved by the viewModel classes from the resource files which are embedded in their dlls. I persume these embedded resources are the 'Language Neutral' ones. When running the application the strings are shown correctly, no problem.
-to create a satellite assembly I started from one of the .resx files and changed the values of the strings in VisualStudio. Lets say the resulting files was called NewRes.resx.
-Using ResGen a new resource file was generated to hold the translated strings: resgen NewRes.resx <originaldllbasename>.de.resources
-Taking this resource file a new assembly was build to serve as the satellite assembly:
AL /embed:c:/temp/<originaldllbasename>.de.resources,<originaldllbasename>.de-DE.resources /culture:de-DE /t:lib /out:/out:c:/temp/<originaldllbasename>.resources.dll
-next a subdirectory 'de' was created next to the application and the <originaldllbasename>.resources.dll assembly was copied to this directory
-attempts to show the localized strings failed so I changed some code to explicitly set the culture and use that in the ResourceManager:
CultureInfo ci = new CultureInfo("de-DE");
string x1 = <namespaces>.Properties.Resources.ResourceManager.GetString(<resourcestring1>,ci);
-eventhough I see (using ProcMon) the satellite assembly .../de/<originaldllbasename>.resources.dll being loaded, the localized strings don't show.
Any help or suggestion to continue troubleshooting what is going wrong is very welcome since I'm out of ideas how to locate the problem, or what I am doing wrong. Kind regards. Yves