本文整理匯總了PHP中Languages::setDefaultLanguage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Languages::setDefaultLanguage方法的具體用法?PHP Languages::setDefaultLanguage怎麽用?PHP Languages::setDefaultLanguage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Languages
的用法示例。
在下文中一共展示了Languages::setDefaultLanguage方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: preDispatch
/**
* Load all the resources
* @see Zend_Controller_Action::preDispatch()
*/
public function preDispatch()
{
$module = $this->getRequest()->getModuleName();
$controller = $this->getRequest()->getControllerName();
// Get all the resources set in the layout.xml file
$css = Shineisp_Commons_Layout::getResources($module, $controller, "css", "base");
$js = Shineisp_Commons_Layout::getResources($module, $controller, "js", "base");
$template = Shineisp_Commons_Layout::getTemplate($module, $controller, "base");
$this->view->doctype('XHTML1_TRANSITIONAL');
$this->view->addBasePath(PUBLIC_PATH . "/skins/setup/base/");
$this->view->headTitle("ShineISP Setup");
$this->view->headMeta()->setName('robots', "INDEX, FOLLOW");
$this->view->headMeta()->setName('author', "Shine Software Company");
$this->view->headMeta()->setName('keywords', "shine software, isp software");
$this->view->headMeta()->setName('description', "This is the ShineISP setup configuration");
$this->view->headLink()->headLink(array('rel' => 'icon', 'type' => 'image/x-icon', 'href' => "/skins/{$module}/base/images/favicon.ico"));
$this->view->headTitle()->setSeparator(' - ');
foreach ($js as $item) {
$this->view->headScript()->appendFile($item['resource']);
}
foreach ($css as $item) {
$this->view->headLink()->appendStylesheet($item['resource']);
}
$this->getHelper('layout')->setLayout('1column');
$session = new Zend_Session_Namespace('setup');
Languages::setDefaultLanguage(PUBLIC_PATH, $session->locale);
if (empty($session->db)) {
$this->_helper->redirector('index', 'database', 'setup');
}
if (empty($session->permissions) || $session->permissions == false) {
$this->_helper->redirector('index', 'checker', 'setup');
}
}