Localization blues....

R

Radu

Hello. I have the following problem:

In a test page I have

<asp:Label ID="lblTestResourceFiles"
runat="server"
Text=""
meta:resourcekey="String1">
</asp:Label>

Under App_GlobalResources I have

Scorecards.fr.resx
and
Scorecards.resx

They contain Name = String1 and Value = This is the text in ENGLISH !
or Ceci est le texte en francais ! respectively.

In Welcome.aspx.vb I have the code:
___________________________________________________________
Protected Overrides Sub InitializeCulture()
g_strWebSiteLanguage = Context.Request.Params("Lang")
If Not String.IsNullOrEmpty(g_strWebSiteLanguage) Then

If g_strWebSiteLanguage = "fr-CA" Then
UICulture = g_strWebSiteLanguage
Culture = g_strWebSiteLanguage
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture(g_strWebSiteLang
uage)
System.Threading.Thread.CurrentThread.CurrentUICulture = New
System.Globalization.CultureInfo(g_strWebSiteLanguage)

Else 'Default to language "en"
UICulture = "en-CA"
Culture = "en-CA"
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture("en-CA")
System.Threading.Thread.CurrentThread.CurrentUICulture = New
System.Globalization.CultureInfo("en-CA")

End If
End If
MyBase.InitializeCulture()
End Sub
___________________________________________________________
where g_strWebSiteLanguage is defined as public string in a module,

and the projects property pages state:

Start Action = Specific Page = Welcome.aspx?Lang=fr_CA

I am expecting to see the label change text from "This is the text in
ENGLISH !" to "Ceci est le texte en francais !" and viceversa,
depending on the parameter "LANG". However, I see none of that. What
am I doing wrong ?

Thanks.
Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,818
Messages
2,569,727
Members
45,664
Latest member
Phil79581

Latest Threads

Top