Trikks

The digital adventures of Eric Herlitz

Archive for January, 2012

Cannot change Language when UseCurrentUICulture is on

Posted by trikks on January 17, 2012

This error occurs since you forgot to set the UseCurrentUICulture to false when instantiating the MetaDataContext object

The error message looks something like this
MetaDataPlusException was unhandled
Cannot change Language when UseCurrentUICulture is on

To solve this you simple need to set the UseCurrentUICulture to false when instantiating your MetaDataContext object, in example

MetaDataContext metaDataContext = new MetaDataContext(connectionString)
{
    UseCurrentUICulture = false,
    Language = Capo.EPiServer.Constants.ProductCatalogConstants.DefaultLanguage
};

Cheers!

Posted in EpiServer Commerce | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.