CultureInfo problem

  • Thread starter Thread starter Tom
  • Start date Start date
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
 
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
 
Back
Top