本文整理汇总了C#中DotNetNuke.Entities.Tabs.TabController.GetDefaultCultureTabList方法的典型用法代码示例。如果您正苦于以下问题:C# TabController.GetDefaultCultureTabList方法的具体用法?C# TabController.GetDefaultCultureTabList怎么用?C# TabController.GetDefaultCultureTabList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Tabs.TabController
的用法示例。
在下文中一共展示了TabController.GetDefaultCultureTabList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: updateButton_Click
protected void updateButton_Click(object sender, EventArgs e)
{
var tabCtrl = new TabController();
var portalCtrl = new PortalController();
int languageCount = LocaleController.Instance.GetLocales(PortalSettings.PortalId).Count;
List<TabInfo> pageList = tabCtrl.GetDefaultCultureTabList(PortalId);
int scriptTimeOut = Server.ScriptTimeout;
Server.ScriptTimeout = timeout;
int languageCounter = 0;
if (chkAllPagesTranslatable.Checked)
{
ProcessLanguage(pageList, LocaleController.Instance.GetLocale(PortalDefault), languageCounter, languageCount);
}
PublishLanguage(PortalDefault, true);
PortalController.UpdatePortalSetting(PortalId, "ContentLocalizationEnabled", "True");
// populate other languages
foreach (Locale locale in LocaleController.Instance.GetLocales(PortalSettings.PortalId).Values)
{
if (!IsDefaultLanguage(locale.Code))
{
languageCounter += 1;
pageList = tabCtrl.GetCultureTabList(PortalId);
//add translator role
Localization.AddTranslatorRole(PortalId, locale);
//populate pages
ProcessLanguage(pageList, locale, languageCounter, languageCount);
//Map special pages
portalCtrl.MapLocalizedSpecialPages(PortalSettings.PortalId, locale.Code);
}
}
//Restore Script Timeout
Server.ScriptTimeout = scriptTimeOut;
//clear portal cache
DataCache.ClearPortalCache(PortalId,true);
//'Redirect to refresh page (and skinobjects)
Response.Redirect(Globals.NavigateURL(), true);
}