Skip to content

Instantly share code, notes, and snippets.

@timgaunt
Created August 9, 2014 12:03
Show Gist options
  • Save timgaunt/0ed5555c460563d3f0fb to your computer and use it in GitHub Desktop.
Save timgaunt/0ed5555c460563d3f0fb to your computer and use it in GitHub Desktop.
Set culture in uCommerce
// Set for any request
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
// Set only if within Umbraco editor
if (Request.RawUrl.Contains("macroResultWrapper") || Request.RawUrl.Contains("GetMacroResultAsHtmlForEditor"))
{
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment