当前位置: 首页>>代码示例>>PHP>>正文


PHP Localization::activeLanguage方法代码示例

本文整理汇总了PHP中Localization::activeLanguage方法的典型用法代码示例。如果您正苦于以下问题:PHP Localization::activeLanguage方法的具体用法?PHP Localization::activeLanguage怎么用?PHP Localization::activeLanguage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Localization的用法示例。


在下文中一共展示了Localization::activeLanguage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="<?php 
echo Localization::activeLanguage();
?>
" xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
Loader::element('header_required');
?>
	
<!-- Site Header Content //-->
<link rel="stylesheet" media="screen" type="text/css" href="<?php 
echo $this->getStyleSheet('main.css');
?>
" />
<link rel="stylesheet" media="screen" type="text/css" href="<?php 
echo $this->getStyleSheet('typography.css');
?>
" />


</head>
<body>
<div id="page">
	<div id="headerSpacer"></div>
	<div id="header">
开发者ID:vipkailiai,项目名称:FCVOVA,代码行数:31,代码来源:header.php

示例2: ccm_doPageReindexing

>
<head>
    <link rel="stylesheet" type="text/css" href="<?php 
echo $this->getThemePath();
?>
/main.css" />
<?php 
$v = View::getInstance();
$v->requireAsset('dashboard');
$v->requireAsset('javascript-localized', 'core/localization');
$v->addFooterItem('<script type="text/javascript">$(function() { ConcreteToolbar.start(); });</script>');
if (Config::get('concrete.misc.enable_progressive_page_reindex') && Config::get('concrete.misc.do_page_reindex_check')) {
    $v->addFooterItem('<script type="text/javascript">$(function() { ccm_doPageReindexing(); });</script>');
}
if (Localization::activeLanguage() != 'en') {
    $v->addFooterItem($html->javascript('i18n/ui.datepicker-' . Localization::activeLanguage() . '.js'));
}
$valt = Loader::helper('validation/token');
$v->addHeaderItem('<meta name="viewport" content="width=device-width, initial-scale=1">');
Loader::element('header_required', array('disableTrackingCode' => true));
$v->addFooterItem('<script type="text/javascript">$(function() { ConcreteDashboard.start(); });</script>');
$u = new User();
$frontendPageID = $u->getPreviousFrontendPageID();
if (!$frontendPageID) {
    $backLink = DIR_REL . '/';
} else {
    $backLink = DIR_REL . '/' . DISPATCHER_FILENAME . '?cID=' . $frontendPageID;
}
$show_titles = !!Config::get('concrete.accessibility.toolbar_titles');
$large_font = !!Config::get('concrete.accessibility.toolbar_large_font');
?>
开发者ID:ceko,项目名称:concrete5-1,代码行数:31,代码来源:header.php

示例3: ccm_doPageReindexing

            $panelSitemap = URL::to('/ccm/system/panels/sitemap');
            $panelAdd = URL::to('/ccm/system/panels/add');
            $panelCheckIn = URL::to('/ccm/system/panels/page/check_in');
            $panelMultilingual = URL::to('/ccm/system/panels/multilingual');
            $js = <<<EOL
<script type="text/javascript">\$(function() {
\t\$('html').addClass('ccm-toolbar-visible');
\tConcretePanelManager.register({'identifier': 'dashboard', 'position': 'right', url: '{$panelDashboard}'});
\tConcretePanelManager.register({'identifier': 'page', url: '{$panelPage}'});
\tConcretePanelManager.register({'identifier': 'sitemap', 'position': 'right', url: '{$panelSitemap}'});
\tConcretePanelManager.register({'identifier': 'multilingual', 'position': 'right', url: '{$panelMultilingual}'});
\tConcretePanelManager.register({'identifier': 'add-block', 'translucent': false, 'position': 'left', url: '{$panelAdd}', pinable: true});
\tConcretePanelManager.register({'identifier': 'check-in', 'position': 'left', url: '{$panelCheckIn}'});
\tConcreteToolbar.start();
\t{$startEditMode}
\t{$launchPageComposer}
});
</script>

EOL;
            $v->addFooterItem($js);
            if (Config::get('concrete.misc.enable_progressive_page_reindex') && Config::get('concrete.misc.do_page_reindex_check')) {
                $v->addFooterItem('<script type="text/javascript">$(function() { ccm_doPageReindexing(); });</script>');
            }
            $cih = Loader::helper('concrete/ui');
            if (Localization::activeLanguage() != 'en') {
                $v->addFooterItem('<script type="text/javascript">$(function() { jQuery.datepicker.setDefaults({dateFormat: \'yy-mm-dd\'}); });</script>');
            }
        }
    }
}
开发者ID:sharadkap,项目名称:webfascia,代码行数:31,代码来源:page_controls_header.php

示例4:

    $videoID = '';
}
if ($playListID) {
    $params[] = 'listType=playlist';
    $params[] = 'list=' . $playListID;
}
if (isset($autoplay) && $autoplay) {
    $params[] = 'autoplay=1';
}
if (isset($color) && $color) {
    $params[] = 'color=' . $color;
}
if (isset($controls) && $controls != '') {
    $params[] = 'controls=' . $controls;
}
$params[] = 'hl=' . Localization::activeLanguage();
if (isset($iv_load_policy) && $iv_load_policy > 0) {
    $params[] = 'iv_load_policy=' . $iv_load_policy;
}
if (isset($loop) && $loop) {
    $params[] = 'loop=1';
}
if (isset($modestbranding) && $modestbranding) {
    $params[] = 'modestbranding=1';
}
if (isset($rel) && $rel) {
    $params[] = 'rel=1';
}
if (isset($showinfo) && $showinfo) {
    $params[] = 'showinfo=1';
}
开发者ID:digideskio,项目名称:concrete5,代码行数:31,代码来源:view.php

示例5: defined

<?php

defined('C5_EXECUTE') or die("Access Denied.");
if (Loader::helper('validation/token')->validate('get_url_slug', $_REQUEST['token'])) {
    $lang = Localization::activeLanguage();
    if (isset($_REQUEST['parentID']) && ($multilingual = Package::getByHandle('multilingual'))) {
        $ms = MultilingualSection::getBySectionOfSite(Page::getByID($_REQUEST['parentID']));
        if (is_object($ms)) {
            $lang = $ms->getLanguage();
        }
    }
    $text = Loader::helper('text');
    $name = $text->urlify($_REQUEST['name'], Config::get('concrete.seo.segment_max_length'), $lang);
    echo $name;
}
开发者ID:ngreimel,项目名称:kovent,代码行数:15,代码来源:url_slug.php

示例6: ccm_doPageReindexing

\tConcreteToolbar.start();
\t{$startEditMode}
\t{$launchPageComposer}
});
</script>

EOL;
            $v->addFooterItem($js);
            if (Config::get('concrete.misc.enable_progressive_page_reindex') && Config::get('concrete.misc.do_page_reindex_check')) {
                $v->addFooterItem('<script type="text/javascript">$(function() { ccm_doPageReindexing(); });</script>');
            }
            $cih = Loader::helper('concrete/ui');
            if (Localization::activeLanguage() != 'en') {
                $alternatives = array(Localization::activeLocale());
                if (Localization::activeLocale() !== Localization::activeLanguage()) {
                    $alternatives[] = Localization::activeLanguage();
                }
                foreach ($alternatives as $alternative) {
                    $alternativeJS = $html->javascript('i18n/ui.datepicker-' . str_replace('_', '-', $alternative) . '.js');
                    if (is_file($alternativeJS->getAssetPath())) {
                        $v->addFooterItem($alternativeJS);
                        break;
                    }
                }
                $v->addFooterItem('<script type="text/javascript">$(function() { jQuery.datepicker.setDefaults({dateFormat: \'yy-mm-dd\'}); });</script>');
            }
            if (!Config::get('concrete.misc.seen_introduction')) {
                $v->addFooterItem('<script type="text/javascript">$(function() { ccm_showAppIntroduction(); });</script>');
                Config::save('concrete.misc.seen_introduction', true);
            }
        }
开发者ID:meixelsberger,项目名称:concrete5-5.7.0,代码行数:31,代码来源:page_controls_header.php

示例7: getOptions

 /** Builds the TinyMCE options string.
  * @param array $override=array() List of key-values options to override
  */
 public function getOptions($overrides = array())
 {
     if (!is_array($overrides)) {
         $overrides = array();
     }
     // Common options
     $textEditorOptions = array('mode' => 'textareas', 'inlinepopups_skin' => 'concreteMCE', 'theme_concrete_buttons2_add' => 'spellchecker', 'browser_spellcheck' => true, 'gecko_spellcheck' => true, 'relative_urls' => false, 'document_base_url' => BASE_URL . DIR_REL . '/', 'convert_urls' => false, 'entity_encoding' => 'raw', 'editor_selector' => 'ccm-advanced-editor');
     // Width
     $width = @intval(Config::get('CONTENTS_TXT_EDITOR_WIDTH'));
     if ($width < 580) {
         $width = 580;
     }
     $textEditorOptions['width'] = $width;
     // Height
     $height = @intval(Config::get('CONTENTS_TXT_EDITOR_HEIGHT'));
     if ($height < 100) {
         $height = 380;
     } else {
         $height -= 70;
     }
     $textEditorOptions['height'] = $height;
     // Determine the text editor mode
     if (array_key_exists('textEditorMode', $overrides)) {
         $textEditorMode = $overrides['textEditorMode'];
         unset($overrides['textEditorMode']);
     } else {
         $textEditorMode = Config::get('CONTENTS_TXT_EDITOR_MODE');
     }
     switch ($textEditorMode) {
         case 'CUSTOM':
             $extraOptions = Config::get('CONTENTS_TXT_EDITOR_CUSTOM_CODE');
             if (is_string($extraOptions)) {
                 $extraOptions = trim($extraOptions, " \t\n\r,");
                 if (strlen($extraOptions)) {
                     // PHP's json_decode fails decoding strings containing comments and strings like '{key:"value"}', since it requires this format '{"key":"value"}' (double quotes around keys)
                     Loader::library('3rdparty/JSON/JSON');
                     $sjs = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
                     @($extraOptions = @$sjs->decode('{' . $extraOptions . "\n" . '}'));
                     if (is_array($extraOptions)) {
                         $textEditorOptions = array_merge($textEditorOptions, $extraOptions);
                     }
                 }
             }
             break;
         case 'ADVANCED':
             $textEditorOptions = array_merge($textEditorOptions, array('plugins' => 'inlinepopups,spellchecker,safari,advlink,table,advhr,advimage,xhtmlxtras,emotions,insertdatetime,paste,visualchars,nonbreaking,pagebreak,style', 'theme' => 'advanced', 'theme_advanced_buttons1' => 'cut,copy,paste,pastetext,pasteword,|,undo,redo,|,styleselect,formatselect,fontsizeselect,fontselect', 'theme_advanced_buttons2' => 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,|,forecolor,backcolor,|,image,charmap,emotions', 'theme_advanced_buttons3' => 'cleanup,code,help,charmap,insertdate,inserttime,visualchars,nonbreaking,pagebreak,hr,|,tablecontrols', 'theme_advanced_blockformats' => 'p,address,pre,h1,h2,h3,div,blockquote,cite', 'theme_advanced_fonts' => 'Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats', 'theme_advanced_font_sizes' => '1,2,3,4,5,6,7', 'theme_advanced_more_colors' => 1, 'theme_advanced_toolbar_location' => 'top', 'theme_advanced_toolbar_align' => 'left', 'spellchecker_languages' => '+English=en'));
             break;
         case 'OFFICE':
             $textEditorOptions = array_merge($textEditorOptions, array('spellchecker_languages' => '+English=en', 'theme' => 'advanced', 'plugins' => 'safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras', 'theme_advanced_buttons1' => 'cut,copy,paste,pastetext,pasteword,|,search,replace,|,undo,redo,|,styleselect,formatselect,fontselect,fontsizeselect,', 'theme_advanced_buttons2' => 'bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,link,unlink,anchor,image,cleanup,code,|,forecolor,backcolor', 'theme_advanced_buttons3' => 'tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,insertdate,inserttime,|,ltr,rtl,', 'theme_advanced_buttons4' => 'charmap,emotions,iespell,media,advhr,|,fullscreen,preview,|,styleprops,spellchecker,|,cite,del,ins,attribs,|,visualchars,nonbreaking,blockquote,pagebreak', 'theme_advanced_blockformats' => 'p,address,pre,h1,h2,h3,div,blockquote,cite', 'theme_advanced_fonts' => 'Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats', 'theme_advanced_font_sizes' => '1,2,3,4,5,6,7', 'theme_advanced_more_colors' => 1, 'theme_advanced_toolbar_location' => 'top', 'theme_advanced_toolbar_align' => 'left', 'theme_advanced_statusbar_location' => 'bottom', 'theme_advanced_resizing' => true));
             break;
         case 'BASIC':
             $textEditorOptions = array_merge($textEditorOptions, array('spellchecker_languages' => '+English=en', 'theme' => 'simple', 'plugins' => 'paste,inlinepopups,spellchecker,safari,advlink'));
             break;
         case 'SIMPLE':
         default:
             $textEditorOptions = array_merge($textEditorOptions, array('theme' => 'concrete', 'plugins' => 'paste,inlinepopups,spellchecker,safari,advlink,advimage,advhr', 'spellchecker_languages' => '+English=en'));
             break;
     }
     $textEditorOptions = array_merge($textEditorOptions, $overrides);
     if (Localization::activeLanguage() != 'en' && !array_key_exists('language', $textEditorOptions)) {
         $textEditorLanguagesFolder = DIR_BASE_CORE . '/' . DIRNAME_JAVASCRIPT . '/tiny_mce';
         if (!empty($textEditorOptions['theme'])) {
             $textEditorLanguagesFolder .= '/themes/' . $textEditorOptions['theme'];
         }
         $textEditorLanguagesFolder .= '/langs/';
         $filenames = array(strtolower(str_replace('_', '-', Localization::activeLocale())), Localization::activeLanguage());
         foreach ($filenames as $filename) {
             if (is_file($textEditorLanguagesFolder . $filename . '.js')) {
                 $textEditorOptions['language'] = $filename;
                 break;
             }
         }
     }
     return $textEditorOptions;
 }
开发者ID:Mihail9575,项目名称:concrete5,代码行数:78,代码来源:tinymce.php


注:本文中的Localization::activeLanguage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。