Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

Localization issue...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christer - 21 Feb 2007 07:59 GMT
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
Christer - 21 Feb 2007 16:00 GMT
Correction of typo:

The file that should match the "en" culture is called
Labels.en.resources. That was just a typo by me when writing the
post...

Thanks in advance...
Christer

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.