I'm new to VB.net and I'm trying to do a simple multilingual project.
So far I've created 2 resource files:
en-US.resx
pt-PT.resx
in both of them I have the same ID's and diferent values (strings only) (these strings will be used across multiple forms)
When I change the laguage I do:
Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
or
Thread.CurrentThread.CurrentCulture = New CultureInfo("pt-PT")
Based on the language I want to see.
But I dont know how to access my resource files properly, Doing:
Dim assembly As System.Reflection.Assembly
assembly = Me.GetType.Assembly
Dim resourceManager As New System.Resources.ResourceManager("My.Resources", assembly)
MsgBox(resourceManager.GetString("TEST"))
Gives me an exception System.Resources.MissingManifestResourceException' occurred in mscorlib.dll
What am I missing?
edit after the first sugestion: