A
andrewbpark
Having a hell of time getting localization to work with the .NET CF.
I'm using the WorldClock example as a model.
I have three resource files defined in a folder named Resources:
strings.resx, strings.en-US.resx, and strings.zh-CHS.resx. These files appear to create the satellite assembles when I deploy. However, I keep getting a MissingManifestResourceException when calling ResourceManager.GetString. Shouldn't it "fall back" to the default resource and not throw this exception?
Basically all of the code is essentially the same as the WorldClock sample.
Two private variables are defined:
Private _rm As ResourceManager = Nothing
Private _ci As CultureInfo =
CType(CultureInfo.CurrentUICulture.Clone(), CultureInfo)
In the constructor:
Me._rm = New ResourceManager("MyApp.Resources.strings",
Me.GetType.Assembly)
In a wrapper function is the call to GetString:
Protected ReadOnly Property GetResourceString(ByVal key As String) As String Get Return _rm.GetString(key, _ci) End Get End Property
Couple of facts/questions that might help diagnose:
1. We are deriving our forms from our own base form.
2. I have a suspicion that the resx files for our forms are corrupt since we don't use the designer to place controls on the form (because we use our own that aren't designer enabled).
3. The exception gets thrown on both a US and Chinese Pocket PC.
Any guidence would be appreciated.
I'm using the WorldClock example as a model.
I have three resource files defined in a folder named Resources:
strings.resx, strings.en-US.resx, and strings.zh-CHS.resx. These files appear to create the satellite assembles when I deploy. However, I keep getting a MissingManifestResourceException when calling ResourceManager.GetString. Shouldn't it "fall back" to the default resource and not throw this exception?
Basically all of the code is essentially the same as the WorldClock sample.
Two private variables are defined:
Private _rm As ResourceManager = Nothing
Private _ci As CultureInfo =
CType(CultureInfo.CurrentUICulture.Clone(), CultureInfo)
In the constructor:
Me._rm = New ResourceManager("MyApp.Resources.strings",
Me.GetType.Assembly)
In a wrapper function is the call to GetString:
Protected ReadOnly Property GetResourceString(ByVal key As String) As String Get Return _rm.GetString(key, _ci) End Get End Property
Couple of facts/questions that might help diagnose:
1. We are deriving our forms from our own base form.
2. I have a suspicion that the resx files for our forms are corrupt since we don't use the designer to place controls on the form (because we use our own that aren't designer enabled).
3. The exception gets thrown on both a US and Chinese Pocket PC.
Any guidence would be appreciated.