problem with localization

C

Chuck Gantz

I saw a reply in this group about localization that pointed to a Microsoft
Walk-through. I decided to actually go through the walkthrough and had a
problem. The site is
http://msdn2.microsoft.com/library/y99d1cd3(en-US,VS.80).aspx.

The problem is in the code:
' Declare a Resource Manager instance.
Dim LocRM As New ResourceManager("WindowsApplication1.WinFormStrings",
GetType(Form1).Assembly)
' Assign the string for the "strMessage" key to a message box.
MessageBox.Show(LocRM.GetString("strMessage"))


Prior to this code, three resource files were created to store the text
"Hello World", "Bonjour le Monde", and "Hallo Welt".
The problem is that the command LocRM.GetString("strMessage") for French,
instead of returning "Bonjour le Monde", returns "Bonjour le MondeBonjour
le Monde". The German resource return four copies of "Hallo Welt".

Any idea what the problem is.

Chuck Gantz
 
C

Cor Ligthert [MVP]

Chuck,

You know that the expiriences with this part of Net are not so high, it is
very complex to use, to maintain and to deploy. For the rest I know no
problems.

It is easier to handle this with your own seperated XML file, which can be a
dataset or whatever, which has than a table per language.

However just my and from others read expiriences here.

Cor
 
C

CMM

Actually localization via resource files is pretty good in VS2005. But,
still not as good and as mature (or as intuitive) as it should be after all
these years.
 
C

CMM

I haven't gone through the walkthrough... but, my first suggestion is to
doublecheck your resource files. Make sure your strings are properly
entered.. I have found that if you're editing them in the grid you might
mistakenly *append* text to it and not even realize it. Go into the field
and hit HOME to jump to the start of the string and then -> right-arrow
through it.

Sounds stupid... but it's happened to me. ;-)

P.S. What are you using 2003 or 2005?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top