File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -65,18 +65,23 @@ private function checkLanguage() {
65
65
define ('LANG_SET ' ,strtolower ($ langSet ));
66
66
67
67
$ group = '' ;
68
- $ lang_path = (defined ('GROUP_NAME ' ) && C ('APP_GROUP_MODE ' )==1 ) ? BASE_LIB_PATH .'Lang/ ' .LANG_SET .'/ ' : LANG_PATH .LANG_SET .'/ ' ;
69
- // 读取项目或者独立分组公共语言包
70
- if (is_file ($ lang_path .'common.php ' ))
71
- L (include $ lang_path .'common.php ' );
72
- // 普通分组公共语言包
73
- if (defined ('GROUP_NAME ' ) && C ('APP_GROUP_MODE ' )==0 ){
74
- if (is_file ($ lang_path .GROUP_NAME .'.php ' ))
75
- L (include $ lang_path .GROUP_NAME .'.php ' );
76
- $ group = GROUP_NAME .C ('TMPL_FILE_DEPR ' );
68
+ $ path = (defined ('GROUP_NAME ' ) && C ('APP_GROUP_MODE ' )==1 ) ? BASE_LIB_PATH .'Lang/ ' .LANG_SET .'/ ' : LANG_PATH .LANG_SET .'/ ' ;
69
+ // 读取项目公共语言包
70
+ if (is_file (LANG_PATH .LANG_SET .'/common.php ' ))
71
+ L (include LANG_PATH .LANG_SET .'/common.php ' );
72
+ // 读取分组公共语言包
73
+ if (defined ('GROUP_NAME ' )){
74
+ if (C ('APP_GROUP_MODE ' )==1 ){ // 独立分组
75
+ $ file = $ path .'common.php ' ;
76
+ }else { // 普通分组
77
+ $ file = $ path .GROUP_NAME .'.php ' ;
78
+ $ group = GROUP_NAME .C ('TMPL_FILE_DEPR ' );
79
+ }
80
+ if (is_file ($ file ))
81
+ L (include $ file );
77
82
}
78
83
// 读取当前模块语言包
79
- if (is_file ($ lang_path .$ group .strtolower (MODULE_NAME ).'.php ' ))
80
- L (include $ lang_path .$ group .strtolower (MODULE_NAME ).'.php ' );
84
+ if (is_file ($ path .$ group .strtolower (MODULE_NAME ).'.php ' ))
85
+ L (include $ path .$ group .strtolower (MODULE_NAME ).'.php ' );
81
86
}
82
87
}
You can’t perform that action at this time.
0 commit comments