S
SomeDude
Hi group,
For some strange reason my custom resource-dll's is not recognized. I have
created a new DLL based on a translated RESX-file but my testapplication
will only return values from the embedded project-resx. Read on for the
full description.
This has been puzzling me for hours so if anybody can help please do
because this is driving me crazy
TIA,
SomeDude
Full description:
When I run my testapplication the first popup confirms that the
CurrentUICulture is indeed nl-NL but the second popup then shows "English"
(as defined in the embedded resx) instead of "Nederlands" which is the
value defined in my generated DLL.
I have added an embedded Resourcefile (Strings.resx) added to my project
which I intend to use as the default resourcefile.
I have created a customized resource-dll based by doing the following:
* I copied "String.resx" to a separate directory and renamed it to
"Strings.nl-NL.resx"
* I ran the command "resgen Strings.nl-NL.resx Strings.nl-NL.resources"
to create a resource-file
* I then compiled the DLL by running the command "al /t:lib
/embed:Strings.nl-NL.resources /culture:nl-NL /out:Strings.resources.dll"
* I copied the generated DLL (Strings.resources.dll) to the handmade
subdirectory "nl-NL" in the applicationdirectory
=== Here's my test-application ===================================
Imports System.Resources
Imports System.Threading
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim resourceManager As ResourceManager = New ResourceManager("MultiLang.Strings", GetType(Form1).Assembly)
My.Application.ChangeUICulture("nl-NL")
MsgBox("CurrentUICulture = "+ Thread.CurrentThread.CurrentUICulture.Name.ToString)
MsgBox(resourceManager.GetString("TESTKEY"))
End Sub
End Class
==========================================================
For some strange reason my custom resource-dll's is not recognized. I have
created a new DLL based on a translated RESX-file but my testapplication
will only return values from the embedded project-resx. Read on for the
full description.
This has been puzzling me for hours so if anybody can help please do
because this is driving me crazy
TIA,
SomeDude
Full description:
When I run my testapplication the first popup confirms that the
CurrentUICulture is indeed nl-NL but the second popup then shows "English"
(as defined in the embedded resx) instead of "Nederlands" which is the
value defined in my generated DLL.
I have added an embedded Resourcefile (Strings.resx) added to my project
which I intend to use as the default resourcefile.
I have created a customized resource-dll based by doing the following:
* I copied "String.resx" to a separate directory and renamed it to
"Strings.nl-NL.resx"
* I ran the command "resgen Strings.nl-NL.resx Strings.nl-NL.resources"
to create a resource-file
* I then compiled the DLL by running the command "al /t:lib
/embed:Strings.nl-NL.resources /culture:nl-NL /out:Strings.resources.dll"
* I copied the generated DLL (Strings.resources.dll) to the handmade
subdirectory "nl-NL" in the applicationdirectory
=== Here's my test-application ===================================
Imports System.Resources
Imports System.Threading
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim resourceManager As ResourceManager = New ResourceManager("MultiLang.Strings", GetType(Form1).Assembly)
My.Application.ChangeUICulture("nl-NL")
MsgBox("CurrentUICulture = "+ Thread.CurrentThread.CurrentUICulture.Name.ToString)
MsgBox(resourceManager.GetString("TESTKEY"))
End Sub
End Class
==========================================================