I have a winform and i changed the language of the form to Dutch. After that i edit the name of the groupboxes labels etc. The moment i change a radiobutton do Dutch it only changes the namess of the groupboxes and not the labels en textboxes.
I changed the language of my form to Dutch. Then i made 2 Radiobuttons Dutch and German. the moment i press Dutch language radiobutton it only changes the name of the groupboxes and the other labels and stuff stay the same.
This is the methode and code i used.
private void ChangeLanguage(string lang)
{
foreach (Control c in Controls)
{
ComponentResourceManager resources = new ComponentResourceManager(typeof(Form1));
resources.ApplyResources(c, c.Name, new CultureInfo(lang));
}
}
private void DutchRadiobutton_CheckedChanged(object sender, EventArgs e)
{
ChangeLanguage("nl-NL");
}
I want the whole form to change and every control in it when i click the radiobutton dutch language. For now only the groupbox names changes but the labels and textboxes in it stay the same langauge.