I have a problem when I want to change the language of my website. For this I use Global Resources. When I use the default language, it shows the correct text. Then there is no problem.
But when I change Culture, it does not update the text in the ASP.NET management properties. I have no idea why.
This code works great
<h1><%= Resources.Default.Register %></h1>
But this code unfortunately does not change its language
<asp:Button ID="Button2" runat="server" Text="<%$ Resources:Default, Register %>" />
I change the language by clicking on LinkButton, for example
protected void lbNL_Click(object sender, EventArgs e)
{
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("nl-BE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl-BE");
Page.Culture = "nl-BE";
Page.UICulture = "nl-BE";
}
Could you help me?
Vincent
source
share