I want to localize my VSTO winforms but I cannot get it to work. The localization does not get applied. For testing I created a very simple Winform that has only one button with some text on it.
Here is how I try to localize the text on the form:
- Set the .Localizable property of the form to True
- Use the popular ResX Manager (https://dotnetfoundation.org/projects/resx-resource-manager)) to translate my strings for the form.
- I also added a Strings.resx (with English and German strings) file that I try to access in the form's name via Me.Text = My.Resources.Strings.SomeRandomName
So as a result I now have a form called frmTest. Its default strings are in English but I can see that a frmTest.de.resx was created that contains my German translations.
Unfortunately the form is still shown in English and also my call to My.Resources.Strings.SomeRandomName results in an English string.
The culture is set to de-DE but I also tried manually changing it via:
System.Threading.Thread.CurrentThread.CurrentUICulture = New CultureInfo("de")
I also tried setting the office language to German which also did not help.
I found several old instructions (e.g. localisation in vsto add-in) but none of them seem to work.