當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Languages::getActiveLanguageList方法代碼示例

本文整理匯總了PHP中Languages::getActiveLanguageList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Languages::getActiveLanguageList方法的具體用法?PHP Languages::getActiveLanguageList怎麽用?PHP Languages::getActiveLanguageList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Languages的用法示例。


在下文中一共展示了Languages::getActiveLanguageList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: languageswitcher

 public function languageswitcher($clslang = "")
 {
     $t = new Zend_Controller_Request_Http();
     $url = $t->getRequestUri();
     $url = explode("?", $url);
     if (count($url) > 0) {
         $uri = $url[0];
     } else {
         $uri = $url;
     }
     $this->view->languages = Languages::getActiveLanguageList();
     $this->view->clslang = $clslang;
     $this->view->uri = $uri;
     return $this->view->render('partials/languageswitcher.phtml');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:15,代碼來源:Languageswitcher.php

示例2: languageswitcher

 public function languageswitcher()
 {
     $ns = new Zend_Session_Namespace('Admin');
     $t = new Zend_Controller_Request_Http();
     $url = $t->getRequestUri();
     $url = explode("?", $url);
     if (count($url) > 0) {
         $uri = $url[0];
     } else {
         $uri = $url;
     }
     $this->view->languages = Languages::getActiveLanguageList();
     $this->view->uri = $uri;
     $this->view->langselected = $ns->lang;
     return $this->view->render('partials/switcher.phtml');
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:16,代碼來源:Languageswitcher.php

示例3: importAction

 /**
  * importAcetion
  * Import all templates from disks
  * @return unknown_type
  */
 public function importAction()
 {
     $controller = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
     $importOK = 0;
     $arrDeleted = array();
     /*
      * Cycle all template and all languages
      */
     $arrLanguages = Languages::getActiveLanguageList();
     if (is_array($arrLanguages) && !empty($arrLanguages)) {
         foreach ($arrLanguages as $lang) {
             if (empty($lang['locale'])) {
                 continue;
             }
             $dir = PUBLIC_PATH . "/languages/emails/" . $lang['locale'];
             foreach (scandir($dir) as $file) {
                 if (!preg_match('/^([a-z0-9A-Z\\-\\_]+)\\.htm$/', $file, $out)) {
                     continue;
                 }
                 if (empty($out[1])) {
                     continue;
                 }
                 // Import
                 $outArray = Shineisp_Commons_Utilities::getEmailTemplate($out[1], $lang['language_id']);
                 if (!empty($outArray)) {
                     $importOK++;
                 }
             }
         }
     }
     if ($importOK > 0) {
         $this->_helper->redirector('list', $controller, 'admin', array('mex' => $this->translator->translate('Template imported successfully'), 'status' => 'success'));
     }
     $this->_helper->redirector('list', $controller, 'admin', array('mex' => $this->translator->translate('An error occurred'), 'status' => 'success'));
 }
開發者ID:kokkez,項目名稱:shineisp,代碼行數:40,代碼來源:EmailstemplatesController.php


注:本文中的Languages::getActiveLanguageList方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。