Tag Archives: locales

List available culture codes in C#

This example shows how you can make a list of the culture codes that are available on the system. Several C# Helper examples deal with globalization including Localize a program in C#. To localize a program, you need to specify … Continue reading

Posted in globalization, internationalization, system | Tagged , , , , , , , , , , , , , | Leave a comment

Display sample formats for different locales in C#

This example loops through the system’s defined locales and displays sample numbers, currency values, dates, and times in each. When the program starts, the following code executes. private void Form1_Load(object sender, EventArgs e) { float float_value = 1234.56f; decimal dec_value … Continue reading

Posted in internationalization, localization | Tagged , , , , , , , , , , | Leave a comment

Draw a timezone conversion chart in C#

The example Use Microsoft Word to make a timezone conversion chart in C# shows how to make a timezone conversion chart in Word. This example creates a print document holding a similar chart. When you select two timezones and click … Continue reading

Posted in internationalization | Tagged , , , , , , , , , | Leave a comment

Use Microsoft Word to make a timezone conversion chart in C#

This example uses Word to generate a timezone conversion chart that lets you easily convert hours from one timezone to another. Select a date and the two timezones. Then press Make Chart to make the conversion chart. (You need to … Continue reading

Posted in internationalization, Office, Word | Tagged , , , , , , , , , , , | 1 Comment

List the defined locales in C#

This example is fairly straightforward. When the form loads, the following event handler lists the defined locales. private void Form1_Load(object sender, EventArgs e) { // Make the ListBox use tabs. lstLocales.UseTabStops = true; lstLocales.UseCustomTabOffsets = true; // Define the tabs. … Continue reading

Posted in internationalization, system | Tagged , , , , , , , , , , , | Leave a comment

List timezones in C#

This simple example uses the following code to display the defined timezones. // Load the timezone information. private void Form1_Load(object sender, EventArgs e) { foreach (TimeZoneInfo info in TimeZoneInfo.GetSystemTimeZones()) lstTimezones.Items.Add(info); } This code simply loops through the TimeZoneInfo objects returned … Continue reading

Posted in internationalization, system | Tagged , , , , , , , , , , , , , , , | 1 Comment