. Aspx <asp: button id = "btnenglish" cssclass = "BTN" runat = "server" backcolor = "white" borderstyle = "NONE"
TEXT = "English" width = "60px" onclick = "btnenglish_click" tabindex = "5"/>
<Asp: button id = "btnchinese" cssclass = "BTN" runat = "server" backcolor = "white" borderstyle = "NONE"
TEXT = "simplified Chinese" width = "60px" onclick = "btnchinese_click" tabindex = "6"/>. CS private void localize () // obtain data from the language file
{
Page. Title = This. getstring ("t0190"); // "Material Control System Identity Verification ";
Lblusercode. Text = This. getstring ("t0164 ");
} Protected void btnEnglish_Click (object sender, EventArgs e)
{
Response. Cookies ["LANGUAGE"]. Expires = DateTime. Now. AddMonths (3 );
Response. Cookies ["LANGUAGE"]. Value = "en-US ";
CurrentSession. Language = "en-US ";
Response. Redirect ("login. aspx? Msg = "+ msgStr +" & sourceUrl = "+ sourceUrl );
} Protected void btnChinese_Click (object sender, EventArgs e)
{
Response. Cookies ["LANGUAGE"]. Expires = DateTime. Now. AddMonths (3 );
Response. Cookies ["LANGUAGE"]. Value = "zh-TW ";
CurrentSession. Language = "zh-TW ";
Response. Redirect ("login. aspx? Msg = "+ msgStr +" & sourceUrl = "+ sourceUrl );
}. Cs class public string GetString (string strNo ){
// Multi-statement support
// ResourceManager rm = new ResourceManager ("TravelRequest. Common. Resource", Assembly. GetExecutingAssembly (); // For VS2003
// Return rm. GetString (strNo); // return Resources. MultiLang. ResourceManager. GetString (strNo); // For VS2005
Return (String) GetGlobalResourceObject ("MultiLang", strNo );}