Setting default culture in web.config (question 1)
<globalization culture="auto:en-US" uiCulture="auto:en"/>
Then, create resource files in theApp_GlobalResources section. For mine, one
example, I have:
Address.resx - english (default)
Address.es.resx - spanish
Address.fr.resx - french
To set labels to different languages, you do it like this:
<asp:Label ID="NoDataLabel" runat="server" Text="<%$ Resources:Manage,
EmptyDataTemplate %>">
Changing Culture: First, let the user default to his native browser choice,
which is what globalization will do natively. If a user has not chosen a
different language, leave it unset.
To change culture, you simply set the culture to the main thread. Grab the
CurrentThread and set the culture on that thread.
Does this cover your questions?
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside of the box!
*************************************************
"shapper" <md*****@gmail.comwrote in message
news:11**********************@k70g2000cwa.googlegr oups.com...
Hello,
I am working on a multilanguage Asp.Net 2.0 web site.
I need to do the following:
1. Set a default culture in Web.Config File.
2. Create a function which changes culture when pressed.
Remember the choosen culture next time the visitor comes to the web
site.
3. Retrieve the current culture.
How can I do this?
Thanks,
Miguel