Localization And Aspnet

The @Page directive has a Culture attribute that you can set to the culture. Search MSDN for the CultureInfo class for more information on possible values for the Culture attribute.

^http://localhost/UseControlsToLocalize.aspx Microsoft Internet Explorer

File Edit View Favonteî Tools Help

Back - ^ ■ J £ $ [TP«ionalBar fJSearch ^Favorites ¡J -

Addreîî -ill:i 1 .• I :.- h i: I■• :-f -ill il :~ il m d ^.- ::■:

Welcome to mylifetimegoals.com

Select your cu ture below:

[The local date is: domingo, 24 de junio de 2QQl[-

Done

Add a switch statement to redirect the user to the appropriate page.

^http://localhost/UseControlsToLocalize.aspx Microsoft Internet Explorer

Add the SubmitBtn_Click function.

Create a new string variable and read the value of the selected item in the dropdown list.

Add a switch statement to redirect the user to the appropriate page.

File Edit View Favonteî Tools Help

Back - ^ ■ J £ $ [TP«ionalBar fJSearch ^Favorites ¡J -

Addreîî -ill:i 1 .• I :.- h i: I■• :-f -ill il :~ il m d ^.- ::■:

Welcome to mylifetimegoals.com

Select your cu ture below:

[The local date is: domingo, 24 de junio de 2QQl[-

Done

E Save the file and request it from the Web server.

£ Copy the Welcomeen_us.aspx, Welcome_es_es.aspx, and Welcome_ja_jp.aspx files from the CD-ROM to the current directory.

[^¡r Local Intranet

Note: These files are used for the different cultures you can select.

Click the Submit button.

-■ The appropriate page for the culture appears with a message.

Was this article helpful?

0 0

Post a comment