A very simple thing, and I can't get it to work. I want to globalise my dll thus I'm using resource files + the ResourceManager.
I call the resourcemanager like this:
var p = new ResourceManager("Appname.Default", Assembly.GetExecutingAssembly());
Get the strings like this
System.Diagnostics.Debug.WriteLine(p.GetString("greeting"));
System.Diagnostics.Debug.WriteLine(p.GetString("greeting", new CultureInfo("nl")));
System.Diagnostics.Debug.WriteLine(p.GetString("greeting", new CultureInfo("nl-NL")));
System.Diagnostics.Debug.WriteLine(p.GetString("greeting", new CultureInfo("en")));
And it returns 4 times the same string. My files are called
Default.resx
Default.en.resx
Default.nl.resx
Default.nl-NL.resx
All file settings are the same, but as mentioned - only the resource in the Default file is used.
What am I overlooking here?
Default.ResourceManager.GetString
. Most likely the resource manager you're creating gets some wrong parameter(s). – Litho