Last post Jun 27, 2012 04:25 PM by DarthSwian
Jun 27, 2012 03:55 PM|DarthSwian|LINK
OK, I'm successfully changing cultures on the fly, working fine. I needed this for date formatting, but that's ALL I need it for. Unfortunately its also changing currency, which I do NOT want it to do. I need currency to display in USD at all times.
Here's what I've got, can anyone shed some light on how I keep the currency formatting in USD?
public void SetCulture(string cult)
if (!String .IsNullOrEmpty(cult))
var selectedLanguage = cult;
Thread .CurrentThread.CurrentCulture = CultureInfo .CreateSpecificCulture(selectedLanguage);
Thread .CurrentThread.CurrentUICulture = new CultureInfo (selectedLanguage);
var dtfi = (DateTimeFormatInfo )Thread .CurrentThread.CurrentCulture.DateTimeFormat.Clone();
Thread .CurrentThread.CurrentCulture.DateTimeFormat = dtfi;
Thread .CurrentThread.CurrentUICulture.DateTimeFormat = dtfi;
Jun 27, 2012 04:25 PM|DarthSwian|LINK
OK, I've found a way to set this at the string level:
I'll proceed using this unless I find a way to do it where I'm setting the culture