Implement multilingual websites (ASP. NET 2.0)

Source: Internet
Author: User
You can rewrite the page in ASP. NET 2.0. Code File initializeculture () to set the uiculture of the page. For example: 1 Protected   Override   Void Initializeculture ()
2 {
3 If (Session [ " Uiculture " ] ! =   Null )
4 {
5Page. uiculture=Session ["Uiculture"]. Tostring ();
6}
7 Base . Initializeculture ();
8 }

Of course it cannot be implemented now. You must generate multi-language resource files on the page. Open the page file, click "Tools" in the menu bar, and click "generate local resource" to generate the corresponding page resource file in "app_localresources.
For example, test. after aspx executes the preceding operations, test is generated in "app_localresources. aspx. resx. If you still need an English resource, you can copy it and rename it as test. aspx. en. resx, and then edit and modify the content.
In this way, the page can automatically generate different language interfaces based on session ["uiculture.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.