Internationalization:
1.Global Resource file
You can set internationalization for all pages.
App_globalresourcesThe folder must contain the following resource files:
Resource. resx
Resource. zh-CN.resx
Resource. En. resx
For Information Descriptions of different country languages, we canResource. zh-CN.resxDefine the following content
BtsaveThe value is "save"
BtcancelThe value is "canceled"
InResource. En. resxThe file is defined as follows:
BtsaveThe value is"Save"
BtcancelThe value is"Cancel"
Then, we marked the following in the page:
<ASP:Button ID= "Btsave" Runat= "Server" Text="<%$ Resources: resource, btsave%>"> </ASP:Button>
<ASP:Button ID= "Btcancel" Runat= "Server" Text="<%$ Resources: resource, btcancel%>"> </ASP:Button>
At the top of the pageUicultureSetAuto,Resource file search is automatically performed for the current language of the browser.
If the browser is Chinese, the above button prompts are "save" and "cancel"
If the browser is English, the above button prompt is displayed as"Save","Cancel"
<%@ Page Language= "C #" Autoeventwireup= "True" Uiculture= "Auto" Culture= "Auto" Codefile= "Login. aspx. cs" Inherits= "Login" %>
2.Local resource file
InApp_localresourcesIn the folder, resource files in different languages are defined, but the resource file name must be the same as the page name and can only be set to internationalization for a single page:
For exampleLogin. aspx,The resource file is:
Login. aspx. resx
Login. aspx. zh-CN.resx
Login. aspx. En. resx
In fact, the application is the same as above