I created local resource files with VisualStudio (.resx and .fr.resx) for each page. All the text of controls in the .aspx page can be translated now.
But can I also translate strings in my code behind in this loacal resource file? If yes, how can I read the value in code behind out of my local .resx files in my App_LocalResources map?
You can try...
Simply call the GetLocalResourceObject method on your current page:
GetLocalResourceObject("yourkey").ToString();
GetGlobalResourceObject("MyGlobalResources", "HelloWorldString").ToString();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With