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.
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.