Skip to content
Snippets Groups Projects
Commit 5dada309 authored by fantu's avatar fantu
Browse files

other improve in multilanguage: if file for current language not exist use master language

parent 2c4579ff
No related branches found
No related tags found
No related merge requests found
......@@ -134,13 +134,13 @@ class tform {
if(!file_exists($lng_file)) $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/en'.'_tform.lng';
include($lng_file);
if($module == '') {
if(is_file("lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng")) {
include_once("lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng");
}
$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng";
if(!file_exists($lng_file)) $lng_file = "lib/lang/en_".$this->formDef["name"].".lng";
include($lng_file);
} else {
if(is_file("../$module/lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng")) {
include_once("../$module/lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng");
}
$lng_file = "../$module/lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng";
if(!file_exists($lng_file)) $lng_file = "../$module/lib/lang/en_".$this->formDef["name"].".lng";
include($lng_file);
}
$this->wordbook = $wb;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment