Created
August 27, 2019 04:58
-
-
Save arman-hpp/fb161009b2ceb780e1f3cf2dd1b092b2 to your computer and use it in GitHub Desktop.
CultureTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void button1_Click(object sender, EventArgs e) | |
{ | |
// Declare a Resource Manager instance. | |
ResourceManager LocRM = new ResourceManager("CultureTest.Language", typeof(Form1).Assembly); | |
// Assign the string for the "strMessage" key to a message box. | |
MessageBox.Show(LocRM.GetString("Hello")); | |
} | |
private void button2_Click(object sender, EventArgs e) | |
{ | |
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); | |
} | |
private void button3_Click(object sender, EventArgs e) | |
{ | |
Thread.CurrentThread.CurrentUICulture = new CultureInfo("fa-IR"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment