Exemple #1
0
 function __construct(&$app)
 {
     $this->app = $app;
     $this->pagedata =& base_render::$_vars;
     $this->tmpl_cachekey('lang', app::get_lang());
     //设置模版所属语言包
 }
Exemple #2
0
 function __construct($app_id)
 {
     $this->app_id = $app_id;
     $this->app_dir = APP_DIR . '/' . $app_id;
     $this->res_url = kernel::base_url() . '/app/' . $app_id . '/statics';
     $this->res_dir = APP_DIR . '/' . $app_id . '/statics';
     $this->app_lang = app::get_lang();
     $this->init_lang_pack();
     //todo:初始化语言包
 }
Exemple #3
0
 static function tips_item_by_app($app_id)
 {
     $lang = app::get_lang();
     $tips = array();
     foreach (file(APP_DIR . '/' . $app_id . '/lang/' . $lang . '/tips.txt') as $tip) {
         $tip = trim($tip);
         if ($tip) {
             $tips[] = $tip;
         }
     }
     return $tips;
 }