加载当前页语言文件
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
加载当前语言/当前模板/当前文件名开头.php文件,
加载当前语言/当前文件名开头.php文件.
例如main_page为contact_us,则加载以上两个目录的contact_usxxxx.php文件
require_languages.php
<?php /** * modules - require_languages.php * load current page's language file * require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php')); */ if(! defined('IS_ADMIN_FLAG')){ die('Illegal Access'); } if(file_exists($language_page_directory . $template_dir . '/' . $current_page_base . '.php')){ $template_dir_select = $template_dir . '/'; } else{ $template_dir_select = ''; } $directory_array = $template->get_template_part($language_page_directory . $template_dir_select, '/^' . $current_page_base . '/'); while(list($key ,$value) = each($directory_array)){ require_once ($language_page_directory . $template_dir_select . $value); } if($template_dir_select != ''){ $directory_array = $template->get_template_part($language_page_directory, '/^' . $current_page_base . '/'); while(list($key ,$value) = each($directory_array)){ require_once ($language_page_directory . $value); } } ?>