1
votes

Need to localise my Winform application to Myanmmar language. We create CultureInfo class from Microsoft supported Culture Name in program and then assign that CultureInfo class to current thread to localise the application.

Thread.CurrentThread.CurrentCulture = new CultureInfo(CultureName); Thread.CurrentThread.CurrentUICulture = new CultureInfo(CultureName);

What is the Culture name or Culture code of Myanmar(Burmese) language supported by .Net?

3
It should be the same as everywhere else...leppie
3rd link on google says it is: my-MMleppie

3 Answers

1
votes

According to this page here: http://www.basicdatepicker.com/samples/cultureinfo.aspx You are looking for my-MM I haven't tested it, but it's consistent with the country's ISO code.

0
votes

Since no one has answered it yet I'll share what I know.

Here is a list of the recognized culture codes: https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx. Browsing that page will turn up nothing for Myanmar(Burmese). Seemingly VB.NET doesn't recognize Myanmar(Burmese). (This may be due to it using different characters than the english language/more common languages.)

Google uses a culture code of "my" for Myanmar(Burmese) but it will error for VB.NET if you attempt to use that to create a new CultureInfo. There may be a possible update you can do to get Burmese into your system though I don't know of one/how to find one.

0
votes
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");
            }
        }