C
Christer
Hi all,
I have been searching this group for an answer, but all responses
seems lead to the same conclusion as I would expect. So even if my
small resource-test is made up of code snippets from the
documentation, I'm still not getting the result I expect.
Here's the setup:
In my windows forms project I have the following files:
Application top node
- Resources (folder)
--- Labels.resources (made with resgen from resx, build action is
"Embedded resource")
--- Labes.en.resources (made with resgen from resx, build action is
"Embedded resource")
I try to access these resources in the following manner:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
ResourceManager rm;
rm = new ResourceManager("[toplevel namespace].Resources.Labels",
this.GetType().Assembly);
MessageBox.Show(rm.GetString("gnu"));
But whether I set the CurrentUICulture or not, the result is the same.
I only get the specified string from Labels.resources. I would expect
the code above to give me the string defined in Labels.en.resources. I
have also tried with a more specific UI culture (en-US), but the
result is the same...
Am I missing something?
Thanks in advance!
Christer
I have been searching this group for an answer, but all responses
seems lead to the same conclusion as I would expect. So even if my
small resource-test is made up of code snippets from the
documentation, I'm still not getting the result I expect.
Here's the setup:
In my windows forms project I have the following files:
Application top node
- Resources (folder)
--- Labels.resources (made with resgen from resx, build action is
"Embedded resource")
--- Labes.en.resources (made with resgen from resx, build action is
"Embedded resource")
I try to access these resources in the following manner:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
ResourceManager rm;
rm = new ResourceManager("[toplevel namespace].Resources.Labels",
this.GetType().Assembly);
MessageBox.Show(rm.GetString("gnu"));
But whether I set the CurrentUICulture or not, the result is the same.
I only get the specified string from Labels.resources. I would expect
the code above to give me the string defined in Labels.en.resources. I
have also tried with a more specific UI culture (en-US), but the
result is the same...
Am I missing something?
Thanks in advance!
Christer