Hello all,
here is my problem. I would like a vb.net application to change the literals
of the labels according to a selection of a combobox. I have created 3 .resx
files (renameFiles.el.resx , renameFiles.en.resx , renameFiles.resx ) using
the vb.net IDE (add new item--->assembly resource file), and added the
key-value pairs needed. The three files reside in the same directory where
all files (aka: forms, modules) reside (non in the bin directory, just one
folder up)
I am trying to read the data using the following
-----------------------------------------------------------
'language can be en or el according to the selection of the combo
Thread.CurrentThread.CurrentUICulture = New CultureInfo(language)
Dim rm As New ResourceManager("renameFiles",
_[Assembly].GetExecutingAssembly)
Me.btnClear.Text = rm.GetString("btnClear")
the message i am getting is :
----------------------------------------
Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly.
Make sure "renameFiles.resources" was correctly embedded or linked into
assembly "RenameFiles".
baseName: renameFiles locationInfo: <null> resource file name:
renameFiles.resources assembly: RenameFiles, Version=1.0.2011.16233,
Culture=neutral, PublicKeyToken=null
I'd appreciate any help :)
Marin Millar - 19 Jul 2005 23:02 GMT
When creating the ResourceManager, you need to pass the full qualified
namespace of the resource. So it might look like:
Dim rm As New ResourceManager("MyProjectNamespace.renameFiles",
_[Assembly].GetExecutingAssembly)
If you have trouble figuring out the fully qualified name, you can open
your assembly in the SDK tool ildasm, and check the name in the manifest,
and use the name of the .resources files which is shown in the manifest.
Thanks,
Marin Millar [MSFT]