Search code examples
c#asp.netvb.netmultilingualapp-globalresources

Global Resource File asp.net


Okay below image is explaining everything.

My Issue

i have also included the code for further explanation.

Thread.CurrentThread.CurrentCulture = New CultureInfo(Session("Lang").ToString())
Dim rm As ResourceManager = New ResourceManager("TodayTimesheet.App_GlobalResources.Lang", Assembly.GetExecutingAssembly())
Dim ci As CultureInfo = Thread.CurrentThread.CurrentCulture
btnSubmit.Text = rm.GetString("Add", ci)

Error message:

An exception of type 'System.Resources.MissingManifestResourceException' occurred in mscorlib.dll but was not handled in user code

Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "TodayTimesheet.App_GlobalResources.Lang.resources" was correctly embedded or linked into assembly "TodayTimesheet" at compile time, or that all the satellite assemblies required are loadable and fully signed.


Solution

  • Nevermind ...

    I have fixed the issue on my own by replacing the following line

     Dim rm As ResourceManager = New ResourceManager("TodayTimesheet.Lang", System.Reflection.Assembly.Load("TodayTimesheet"))