ResourceManager.GetString

  • Thread starter Thread starter eBob.com
  • Start date Start date
E

eBob.com

I am experimenting with this code ...

Public Class Define_New_Template

Private Sub Define_New_Template_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Handles MyBase.Load

Thread.CurrentThread.CurrentUICulture = New CultureInfo("en-US")

Dim LocRM As New ResourceManager("FL...0.WinFormStrings", _
GetType(Form1).Assembly)
Try
' Assign the string for the "strMessage" key to a message box.
MessageBox.Show(LocRM.GetString("define_new_template_form_title"))
Catch ex As Exception
MsgBox(ex.Message)
End Try

...

.... in my first ever attempt to globalize an application. (The code is
modeled on what I found here:
ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/dv_mancli/html/9a96220d-a19b-4de0-9f48-01e5d82679e5.htm)

The ResourceManager.GetString call blows up with this message: Could not
find any resources appropriate for the specified culture or the neutral
culture. Make sure "FL...0.WinFormStrings.resources" was correctly embedded
or linked into assembly "FL...0" at compile time, or that all the satellite
assemblies are loadable and fully signed.

I have created, as per the documentation, files WinFormStrings.resx,
WinFormStrings.en-US.resx, and WinFormStrings.pl-PL.resx. And VS knows
about these files, I created them using VS and they show up in the Solution
Explorer.

I'm completely lost. I have no idea how to embed or link something into an
assembly, I don't know what a satellite assembly is, let alone how to make
one loadable or how to sign one. I hope I made a simple mistake and don't
have to learn about embedding and linking and satellite assemblies and how
to load and sign them.

PS: I'm not sure if I can do Thread.CurrentThread.CurrentUICulture = New
CultureInfo("en-US") here. That's the subject of another post.

Thanks, Bob
 
Back
Top