Hello, I'm using VS.NET 2003, VB.NET. My project structure is like this: myAppName (root) | - resources | - resources.resx - resources.de-DE.resx Inside my global.asax.vb I have this: [Application_Start] ResourceManager.CreateFileBasedResourceManager("Resources",
Server.MapPath("resources") + Path.DirectorySeparatorChar, Nothing) and [Application_BeginRequest] Try Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Request.UserLanguages(0)) Catch Thread.CurrentThread.CurrentCulture = New CultureInfo("de-DE")
End Try Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture Inside my default.aspx.vb I have this: [Page_Init] rm = Application("RM") If (rm Is Nothing) Then Server.Transfer("Error.aspx") End If and [Page_Load] labelEmpty.Text = rm.GetString("t1")
The problem is is that it can't find the resources files. Does somebody knows a solution? Thanks!
instead of: ResourceManager.CreateFileBasedResourceManager("Resources", Server.MapPath("resources") + Path.DirectorySeparatorChar, Nothing) try: new ResourceManager("a", Assembly.GetExecutingAssembly()); where a = namespace+class that contains your resources
Good luck, Owin
Member
582 Points
422 Posts
How to load the resource files?
Aug 27, 2004 12:28 PM|ShadowDanser|LINK
None
0 Points
1 Post
Re: How to load the resource files?
Feb 19, 2005 06:44 AM|Green Gamez|LINK
Member
1 Points
52 Posts
Re: How to load the resource files?
Feb 28, 2005 11:12 AM|owingruters|LINK