The problem I am having is that a change of culture is not "sticking". I
provide a poplist of cultures and allow the user to select culture from a
poplist. In the handler for this poplist I set CurrentCulture and
CurrentUICulture, thus :
private void cCulture_SelectedIndexChanged(object sender, System.EventArgs
e)
{
string newCulture = cCulture.SelectedItem.Value;
Thread.CurrentThread.CurrentCulture = new CultureInfo(newCulture);
Thread.CurrentThread.CurrentUICulture =
Thread.CurrentThread.CurrentCulture;
Debug.WriteLine("Culture switched to "+newCulture);
testCulture();
// loses culture again here
}
and in testCulture() I write out some dates and numbers to check what
culture is being used. When I change the culture using the poplist I get the
output I expect, but if I invoke testCulture from some other handler, eg. a
button handler, the output is in the default English-US again (when I hit
the button AFTER changing the culture poplist).
What am I missing? HOw can I make the change of culture stick not only
within the context of the Page being run, but all other pages run in the
user's session?