CultureInfo problem

T

Tom

Hello all,



I need to add support for Macedonian language to rather old project (C#,
..NET 1.0).

When user changes language, following code is executed:



Thread.CurrentThread.CurrentUICulture = new CultureInfo(code); // this
sets culture for current thread



Grid cells use "c" format to display decimal values, fine so far... works
great for "de", "en", "sr-SP-Latn" etc. However, for Macedonian culture
("mk-MK" or "mk"), euro is always used as currency (e.g. ? 2.454,39).
CurrentUICulture.NumberFormat holds correct currency symbol and Regional
settings seems to be in order. Any idea how to crack this down?



Thanks and best regards,

Tom
 
M

Morten Wennevik [C# MVP]

Hello all,



I need to add support for Macedonian language to rather old project (C#,
.NET 1.0).

When user changes language, following code is executed:



Thread.CurrentThread.CurrentUICulture = new CultureInfo(code); //this
sets culture for current thread



Grid cells use "c" format to display decimal values, fine so far... works
great for "de", "en", "sr-SP-Latn" etc. However, for Macedonian culture
("mk-MK" or "mk"), euro is always used as currency (e.g. ? 2.454,39).
CurrentUICulture.NumberFormat holds correct currency symbol and Regional
settings seems to be in order. Any idea how to crack this down?



Thanks and best regards,

Tom

Hi Tom.

CurrentUICulture specifies what resource file should be used (assuming you have various resource files for various cultures), and affects customized text on labels etc, but it does not specify the culture for the current thread.

Try setting Thread.CurrentThread.CurrentCulture
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top