I know this is a very simple task for a lot of people. But I had been looking for the easiest way to do this task for long. Youtube helped me to finding the easiest way to this task. So I am not gonna write a lot of text. I will just paste the you tube link. And then few lines of code which will provide the nice way to change from english to bangla(Both Way). Watch the youtube video first:
Localization in asp.net
My IIS/VS2008 didn’t have bn-BD, so I worked with bn-IN culture. There are way to use bn_BD in iis 5.1, but it is easy on IIS-7. I am not going details on that.
Suppose you have file name “Contact.aspx”, so you have to have Contact.aspx.resx and Contact.aspx.bn-IN.resx in App_Localresources folder.
I have a dropdown in my .aspx page which has en-US for english and bn-IN for Bangla, changing the dropdown will call IntializeCulture function. If you have set up your browser according to instruction from youtube. You will be able to see bangla. I am sure using this loginc you will be able to change your page as per your requirement.
protected override void InitializeCulture()
{
if (Request.Form["DropDownList1"] != null)
{
string selectedLanguage = Request.Form["DropDownList1"];
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(selectedLanguage);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(selectedLanguage);
}
base.InitializeCulture();
}
Change to .rar after download(Right click to download): Bangla Solution File