you can set the language typeto the label text in one of the forms and then you choose the language which one you want to show to the end user compare with the language with that label text I.E, if the label text is french then you can show all your control names in french
NOte: its only works after you creating the resx file in french and rewrite manually all label and button control names in french as name value something like this..
Name value
----------- -------------
lblname.text frenchtype name
using System;
using System.IO;
using System.Linq;
using System.Data;
using System.Text;
using System.Diagnostics;
using System.Windows.Forms;
using System.Collections.Generic;
using System.ComponentModel;
public partial class Form1 : Form
{
public form1()
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new
System.Globalization.CultureInfo("fr-FR");
getlanguagaefile();
InitializeComponent();
}
// blah
// blah
private void getlanguagaefile()
{
if (label1.Text == "French")
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new
System.Globalization.CultureInfo("fr-FR");
ComponentResourceManager resources = new ComponentResourceManager(typeof(Wait));
resources.ApplyResources(this, "$this");
applyResources(resources, this.Controls);
}
}
you can display french language to all label texts and button texts when the form loads
private void applyResources(ComponentResourceManager resources, Control.ControlCollection controlCollection)
{
foreach (Control ctl in controlCollection)
{
resources.ApplyResources(ctl, ctl.Name);
applyResources(resources, ctl.Controls);
}
}
}