本文整理汇总了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');
}
}