piruthivi6 says:
Thread.CurrentThread.CurrentCulture = new CultureInfo(Session["Lang"].ToString());
rm = new ResourceManager("Multilanguagesupport.App_GlobalResources.Lang", Assembly.GetExecutingAssembly()); //we configure resource manages for mapping with resource files in App_GlobalResources folder.
ci = Thread.CurrentThread.CurrentCulture;
You don't need to use the ResourceManager class to fetch the value using Name.
Only set the CurrentCulture and CurrentUICulture from session.
Then using the Resources namespace fetch the value from the resource file using the Name.
Use the below code.
private void LoadString()
{
//Set the Culture.
Thread.CurrentThread.CurrentCulture = new CultureInfo(Session["Lang"].ToString());
Thread.CurrentThread.CurrentUICulture = new CultureInfo(Session["Lang"].ToString());
studname.Text = Resources.Lang.StudentName;
Label2.Text = Resources.Lang.DateOfBirth;
Label4.Text = Resources.Lang.DateOfBirthGender;
Label3.Text = Resources.Lang.DateOfBirthAddress;
Submit.Text = Resources.Lang.DateOfBirthSubmit;
btnBack.Text = Resources.Lang.DateOfBirthBack;
reqfield.Text = Resources.Lang.DateOfBirthStudentReqfield;
Label5.Text = Resources.Lang.MobileNumber;
Label1.Text = Resources.Lang.District;
Label6.Text = Resources.Lang.Taluk;
Label7.Text = Resources.Lang.EmailID;
}
For more details refer below article.
ASP.Net Multilingual website: Support and display Multiple Languages (English French) in ASP.Net