本文整理汇总了PHP中MY_Lang::setLang方法的典型用法代码示例。如果您正苦于以下问题:PHP MY_Lang::setLang方法的具体用法?PHP MY_Lang::setLang怎么用?PHP MY_Lang::setLang使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MY_Lang
的用法示例。
在下文中一共展示了MY_Lang::setLang方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit_tariff_menus
public function edit_tariff_menus()
{
\MY_Lang::setLang('en_US');
$lang = new \MY_Lang();
$lang->load('admin_menu');
$type = $_GET['type'] ? $_GET['type'] : 'billing';
$tariffs = \saas\models\SaasTariff::all();
foreach ($tariffs as $key => $tariff) {
$tariffs[$key]->menu = $this->load->module('admin_menu')->setDevMode("Tariff_{$tariff->id}_menu", $type)->show();
}
$menus = array('full' => $this->load->module('admin_menu')->setDevMode('full')->show(), 'tariffs' => $tariffs);
$menus = array_filter($menus);
$this->template->registerCssFile('./application/modules/admin_menu/assets/js/context_menu/jquery.contextMenu.css');
$this->template->registerJsFile('./application/modules/admin_menu/assets/js/context_menu/jquery.contextMenu.js', 'after');
$this->template->registerJsFile('./application/modules/admin_menu/assets/js/context_menu/jquery.ui.position.js', 'after');
$this->load->module('admin_menu')->unsetDevMode();
\CMSFactory\assetManager::create()->setData('menus', $menus)->registerStyle('admin_menu_dev_tariff')->registerScript('admin_menu_dev')->renderAdmin('edit_tariff_menus');
}
示例2: getMenuList
/**
* Get rendered menu
* @param string $type - menu file name
* @return string
*/
public static function getMenuList($type)
{
self::$CI =& get_instance();
self::$MENU_LIST = '';
\MY_Lang::setLang('en_US');
$lang = new \MY_Lang();
$lang->load('admin_menu');
$menu = (include_once self::getMenuPath() . "{$type}.php");
\MY_Lang::setLang(self::$CI->config->item('language'));
$lang->load('admin_menu');
foreach ($menu as $item) {
self::renderMenuItem($item);
}
return self::$MENU_LIST;
}