Commit d82bfbb2 authored by fantu's avatar fantu
Browse files

Multilanguage improve also in "searchform-system"

parent 97b47294
......@@ -151,7 +151,11 @@ class searchform_actions {
global $app;
// Language File setzen
$lng_file = ISPC_WEB_PATH.'/lang/lib/lang/'.$_SESSION['s']['language'].'_list.lng';
if(!file_exists($lng_file)) $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/en_'.'_list.lng';
include($lng_file);
$lng_file = "lib/lang/".$_SESSION["s"]["language"]."_".$app->searchform->listDef['name']."_search.lng";
if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$app->searchform->listDef['name']."_search.lng";
include($lng_file);
$app->tpl->setVar($wb);
$app->tpl->setVar("form_action",$app->searchform->listDef["file"]);
......
......@@ -129,46 +129,8 @@ Suche speichern unter: <input type="text" name="search_save_as" /> <input type="
}
fclose($handle);
$lang["page_txt"] = 'Page';
$lang["page_of_txt"] = 'of';
$lang["page_next_txt"] = 'Next';
$lang["page_back_txt"] = 'Back';
$lang["delete_txt"] = 'Delete';
$lang["filter_txt"] = 'Filter';
// speichere language Datei
$this->lng_add($lang,$listDef,$module);
}
function lng_add($lang,$listDef,$module = '') {
global $go_api, $go_info,$conf;
if($module == '') {
$lng_file = "lib/lang/".$conf["language"]."_".$listDef['name']."_search.lng";
} else {
$lng_file = '../'.$module."/lib/lang/en_".$listDef['name']."_search.lng";
}
if(is_file($lng_file)) {
include_once($lng_file);
} else {
$wb = array();
}
$wb_out = array_merge($wb,$lang);
if(is_array($wb_out)) {
$fp = fopen ($lng_file, "w");
fwrite($fp,"<?php\r\n");
foreach($wb_out as $key => $val) {
$new_line = '$wb["'.$key.'"] = '."'$val';\r\n";
fwrite($fp,$new_line);
}
fwrite($fp,"?>");
fclose($fp);
}
}
}
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment