本文整理汇总了PHP中eZTranslatorManager::resetTranslations方法的典型用法代码示例。如果您正苦于以下问题:PHP eZTranslatorManager::resetTranslations方法的具体用法?PHP eZTranslatorManager::resetTranslations怎么用?PHP eZTranslatorManager::resetTranslations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZTranslatorManager
的用法示例。
在下文中一共展示了eZTranslatorManager::resetTranslations方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setActiveTranslation
static function setActiveTranslation($locale, $permanently = true)
{
if (!eZTranslatorManager::dynamicTranslationsEnabled()) {
return;
}
if ($permanently) {
$siteINI = eZINI::instance('site.ini.append', 'settings/override', null, null, false, true);
} else {
$siteINI = eZINI::instance();
}
$siteINI->setVariable('RegionalSettings', 'Locale', $locale);
$siteINI->setVariable('RegionalSettings', 'TextTranslation', 'enabled');
if ($permanently) {
$siteINI->save('site.ini.append', '.php', false, false);
eZINI::resetInstance("site.ini");
}
eZTranslatorManager::resetTranslations();
}
示例2: array
if ($contentINI->hasVariable('VersionView', 'DefaultPreviewDesign')) {
$siteAccess = $contentINI->variable('VersionView', 'DefaultPreviewDesign');
} else {
$siteAccess = eZTemplateDesignResource::designSetting('site');
}
}
$access = $GLOBALS['eZCurrentAccess'];
$access['name'] = $siteAccess;
if ($access['type'] === eZSiteAccess::TYPE_URI) {
$access['uri_part'] = array($siteAccess);
}
eZSiteAccess::load($access);
eZDebug::checkDebugByUser();
// Change content object default language
$GLOBALS['eZContentObjectDefaultLanguage'] = $LanguageCode;
eZTranslatorManager::resetTranslations();
ezpI18n::reset();
eZContentObject::clearCache();
eZContentLanguage::expireCache();
$Module->setTitle('View ' . $class->attribute('name') . ' - ' . $contentObject->attribute('name'));
$ini = eZINI::instance();
$res = eZTemplateDesignResource::instance();
$res->setDesignSetting($ini->variable('DesignSettings', 'SiteDesign'), 'site');
$res->setOverrideAccess($siteAccess);
$tpl = eZTemplate::factory();
if ($http->hasSessionVariable('LastAccessesVersionURI')) {
$tpl->setVariable('redirect_uri', $http->sessionVariable('LastAccessesVersionURI'));
}
$designKeys = array(array('object', $contentObject->attribute('id')), array('node', $virtualNodeID), array('remote_id', $contentObject->attribute('remote_id')), array('class', $class->attribute('id')), array('class_identifier', $class->attribute('identifier')), array('viewmode', 'full'));
// View mode
if ($assignment) {