private void btnSave_Click(object sender, EventArgs e)
{
appData.WriteXml(string.Format("{0}/data.xml", Application.StartupPath));
ResourceWriter ren = new ResourceWriter(Application.StartupPath+"/resource.en-US.resources");
ResourceWriter rmy = new ResourceWriter(Application.StartupPath + "/resource.my-MM.resources");
foreach (AppData.LanguagesRow row in appData.Languages.Rows)
{
ren.AddResource(row.ID, row.English);
rmy.AddResource(row.ID, row.Myanmar);
}
ren.Generate();
ren.Close();
rmy.Generate();
rmy.Close();
MessageBox.Show("Save Successfully!");
}
private void Form1_Load(object sender, EventArgs e)
{
appData.ReadXml(string.Format("{0}/data.xml", Application.StartupPath));
CultureInfo ci = new CultureInfo("my-MM");
Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;
ResourceManager rm = ResourceManager.CreateFileBasedResourceManager("resource", Application.StartupPath, null);
if (rm.GetString("1") != null)
{
label1.Text = rm.GetString("1");
}
}
my-MM
– leppie