I have a strong preference for using text files. Other modules of this
similar. We plan to share most of the resources to economize on translation
costs. So I would really like to get the text file method to work if at all
"Michael Höhne" wrote:
> If you're not somehow limited to using text files, please see the discussion
> "Localizing non object strings" in this newsgroup. It describes how to use
> resource files and localize them in VS.NET 2005, and I guarantee that it
> works and is much easier to use.
>
> Michael
>
> --
> Michael
>
http://www.stunnware.com/crm > ----------------------------------------------------------
> "Mike Leftwich" <Mike Leftwich@discussions.microsoft.com> schrieb im
> Newsbeitrag news:869849AE-AEA1-4758-AC55-64B534C65F1C@microsoft.com...
> > I've created a very simple test app with WinForms to learn how to use
> > localization in .NET. The app simply has a button that displays a
> > MessageBox
> > with a message retrieved from ResourceManager.GetString. Here's the code:
> >
> > private ResourceManager rm =
> > ProdRegTest.Properties.Resources.ResourceManager;
> > private void button2_Click(object sender, EventArgs e)
> > {
> > string msg = rm.GetString("IDS_MSG");
> > MessageBox.Show(msg);
> > }
> >
> > I added a text file resource to my project in the project properties
> > dialog,
> > then entered a single line like the following:
> >
> > IDS_MSG = Hello world
> >
> > When I run the program, the message box is displayed with a null string
> > instead of "Hello world".
> >
> > I have verified that VS creates the .resources file in the obj\debug
> > directory, and I've looked at the .exe in a hex editor and can see the
> > string
> > resource embedded in the executable, but for some reason the call to
> > GetString is returning a null string.
> >
> > I've tried this now in 2 different projects, with the same result. I'm
> > sure
> > I must be doing something really dumb, but I can't see what it might be.
> >
> > Thanks in advance.
> >
> > Mike
>
>