CultureSiteInfoProvider

raj k asked on January 5, 2015 07:57

var siteCode = CultureSiteInfoProvider.GetSiteCultureCodes(SiteContext.CurrentSiteName)[0].ToString();

This is worked in kentico 8 but iam working in kentico 7.0.51 please tell me how to do this in kentico 7.0.51

Recent Answers


Sandro Jankovic answered on January 5, 2015 10:54

Hello,

Please try string siteCode = CultureInfoProvider.GetSiteCultureCodes(CurrentSiteName)[0]; and let us know if you have any issues with this.

Best Regards,

Sandro

0 votesVote for this answer Mark as a Correct answer

Vilém Jeniš answered on January 7, 2015 10:22

Or you can try to get the CurrentSiteName from CMSContext. In Kentico 7 there was CMSContext which was broken up into several contexts for version 8.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.