User-1028151323 posted
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?
<!-- Start block. Created with Code4Blog for Microsoft Visual Studio 2010. Copyright (c)2010 Vitaly Zayko http://zayko.net -->
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;
}
}
<!-- End block -->