Answered by:
Globalization and Localization

Question
-
User534182787 posted
how to apply resource files to my website , what is the use global resource file and local resource file, how to coonect to webpage to resource files ,
Please tell me that the procedure they work with website and how it is wrk
Wednesday, July 18, 2012 2:53 AM
Answers
-
User281026190 posted
Hi, friend
Try to write this
using System.Globalization; using System.Threading; public partial class _Default : System.Web.UI.Page { protected override void InitializeCulture() { base.InitializeCulture(); if (Request.QueryString["Language"] != null) { Thread.CurrentThread.CurrentCulture = new CultureInfo(Request.QueryString["Language"]); Thread.CurrentThread.CurrentUICulture = new CultureInfo(Request.QueryString["Language"]); } } protected void Page_Load(object sender, EventArgs e) { } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedIndex !=0) { //here SelectedValue as a pattern such as ar-EG or en-US Response.Redirect(Request.Path+"?Language="+DropDownList1.SelectedValue); } } protected void LinkButton1_Click(object sender, EventArgs e) { Response.Redirect("~/Login.aspx?Language=" + Request.QueryString["Language"]); } }
Visit these links if you wanna more info
http://www.codeproject.com/Articles/14818/ASP-NET-2-0-Globalization-Localization-solution
http://www.codeproject.com/Articles/325222/Globalization-and-Localization-in-ASP-Net-web-appl
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, July 21, 2012 6:35 PM
All replies
-
Wednesday, July 18, 2012 3:31 AM
-
User455156504 posted
Hi,
all information can be found on the following MSDN site - http://msdn.microsoft.com/en-us/library/c6zyy3s9.aspx
Wednesday, July 18, 2012 10:35 AM -
User281026190 posted
Hi, friend
Try to write this
using System.Globalization; using System.Threading; public partial class _Default : System.Web.UI.Page { protected override void InitializeCulture() { base.InitializeCulture(); if (Request.QueryString["Language"] != null) { Thread.CurrentThread.CurrentCulture = new CultureInfo(Request.QueryString["Language"]); Thread.CurrentThread.CurrentUICulture = new CultureInfo(Request.QueryString["Language"]); } } protected void Page_Load(object sender, EventArgs e) { } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList1.SelectedIndex !=0) { //here SelectedValue as a pattern such as ar-EG or en-US Response.Redirect(Request.Path+"?Language="+DropDownList1.SelectedValue); } } protected void LinkButton1_Click(object sender, EventArgs e) { Response.Redirect("~/Login.aspx?Language=" + Request.QueryString["Language"]); } }
Visit these links if you wanna more info
http://www.codeproject.com/Articles/14818/ASP-NET-2-0-Globalization-Localization-solution
http://www.codeproject.com/Articles/325222/Globalization-and-Localization-in-ASP-Net-web-appl
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, July 21, 2012 6:35 PM