Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2007

Tip: Looking for answers? Try searching our database.

CultureInfo problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom - 25 Jul 2007 17:04 GMT
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
Morten Wennevik [C# MVP] - 26 Jul 2007 09:44 GMT
> Hello all,
>
[quoted text clipped - 15 lines]
>
> 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

Signature

Happy coding!
Morten Wennevik [C# MVP]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.