define([], function () { function SiteContext() { } SiteContext.prototype.isPageEditor = function () { if (typeof Sitecore == "undefined") { return false; } if (typeof Sitecore.PageModes == "undefined" || Sitecore.PageModes == null) { return false; } return Sitecore.PageModes.PageEditor != null; } SiteContext.prototype.getContextLanguage = function () { return document.getElementById("systemCode").value; //return document.documentElement.attributes["data-context-lang"].value; // document.documentElement.lang; } return new SiteContext(); });