I’m trying to localize an SSIS transform component that I’ve written. There are several Forms that are used to interact with the user. I’ve set the forms’ Localizable property to true, set the language to German (Germany) and set my prompts to German translations.
I then test, but putting this in the form’s c’tor:
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
But I only get default (English) prompts. When I do this with a standalone app, it works perfectly.
Next, I figured I’d try a string resource to see if I fare any better. I create a VerifyLoc.resx and some strings, and then a VerifyLoc.de-DE.resx and some German strings with the same names. I test again:
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");
string str1 = VerifyLoc.Str1;
string str2 = VerifyLoc.Str2;
No luck, str1 and str2 are default, not German. Next I try to force the thing with this:
ComponentResourceManager resources = new ComponentResourceManager(typeof(VerifyLoc));
CultureInfo culture = new CultureInfo("de-DE");
string str1 = resources.GetString("Str1", culture);
string str2 = resources.GetString("Str2", culture);
Still no good. I’ve checked the properties of the de-DE.resx file against the default one, both are using the ‘Internal’ Access Modifier. Both are marked as ‘Embedded Resource’, both running through the ResXFileCodeGenerator.
Unfortunately, I don’t have a German version of Windows, so I have been unable to pin this down to a problem with my trying to force it to use German or a problem with the generation of the resources themselves.
Any ideas?
It sounds like the German satellite assembly doesn’t get built or deployed to the correct location. Do you see a .resources.dll file with the name of your assembly inside a de-DE folder?