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 / .NET Framework / Internationalization / July 2005

Tip: Looking for answers? Try searching our database.

create simple resource files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
juststarter - 04 Jul 2005 09:43 GMT
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]

Rate this thread:







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.