re:
You might want to post the code here for the OP to see?
Why not?
If I had a nickel for every line of code I've given away for free here
....well, you know how the rest of that goes.
Here's the crux...and the trick.
<%@ Page Language="VB" uiculture="auto" %>
<%@ Import Namespace="System.Threading" %>
<%@ Import Namespace="System.Globalization" %>
<script runat="server">
Protected Overrides Sub InitializeCulture()
If Request.Form("ListBox1") IsNot Nothing Then
Dim selectedLanguage As String = Request.Form("ListBox1")
UICulture = Request.Form("ListBox1")
Culture = Request.Form("ListBox1")
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage)
Thread.CurrentThread.CurrentUICulture = New CultureInfo(selectedLanguage)
End If
MyBase.InitializeCulture()
End Sub
</script>
<form id="form1" runat="server">
<div>
<asp:ListBox ID="ListBox1" runat="server">
<asp:ListItem Value="en-US" Selected="True">English</asp:ListItem>
<asp:ListItem Value="es-MX">Español</asp:ListItem>
<asp:ListItem Value="de-DE">Deutsch</asp:ListItem>
</asp:ListBox><br />
<asp:Button ID="Button1" runat="server"
Text="Set Language"
meta:resourcekey="Button1" />
<br />
</div>
The trick, as should be obvious by now, is that you don't *need* to pass the EnglishName.
The value that we *do* pass is CultureInfo.CurrentCulture.Name,
but we *display* whatever name we want to display to the user.
That way, it's transparent to the user *and* easy to program as well.
One of the most difficult concepts to grasp in programming
is that we should not attempt to lock a route to the desired result.
As long as we get where we want to get to, any route is OK.
Some routes are impossible and some are a waste,
but getting to where we want to get, with the least effort expended, is what counts.