RSS 2.0
# Monday, January 08, 2007

Sinds 1 januari gebruikt slovenie de euro en dus moeten alle e-commerce sites over op de euro. Of eigenlijk beter gezegd, de culture settings van Windows moeten nu gebruik maken van de euro voor Slovenie. Helaas is dit niet aan te passen (verandert automatisch terug) en zou er dus een Windows update moeten komen. Zolang die er niet is, moet je de standaardinstellingen overschrijven. Dit kan met de volgende code:

CultureInfo culture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
culture.NumberFormat.CurrencySymbol =
"€";
culture.NumberFormat.CurrencyPositivePattern = 2;
// € 19.95
culture.NumberFormat.CurrencyNegativePattern = 12; // € -19.85
Thread.CurrentThread.CurrentCulture = culture;

Hiermee wordt op thread niveau de CultureInfo aangepast. Deze zet je tijdelijk in Application_BeginRequest van global.asax en dan werkt het prima. Overigens niet vergeten of the thread wel Sloveens is om mee te beginnen...

Monday, January 08, 2007 3:45:47 PM (W. Europe Standard Time, UTC+01:00)  #    Comments [0] -
ASP.NET | Nederlands
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, strike) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview
Sign In

Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
About
This is the blog of Michiel van Otegem, a Senior Software Architect with Sogeti Netherlands, and author of several books and numerous articles on (ASP).NET, XML, and related technologies.
Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Michiel van Otegem
All Content © 2012, Michiel van Otegem
DasBlog theme 'Business' created by Christoph De Baene (delarou)