Skip to content

Commit 3505605

Browse files
author
fantu
committed
- Improve of multilanguage, now the string of list-file mustn't be repeated in dozens of files and dozens of times translate and check for this any list page is not necessary now
1 parent bef7e24 commit 3505605

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

interface/lib/classes/listform.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public function loadListDef($file, $module = '')
6262
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_'.$this->listDef['name'].'_list.lng';
6363
if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$this->listDef['name'].'_list.lng';
6464
include($lng_file);
65+
$lng_file = ISPC_WEB_PATH.'/lang/lib/lang/'.$_SESSION['s']['language'].'_list.lng';
66+
if(!file_exists($lng_file)) $lng_file = ISPC_WEB_PATH.'/lang/lib/lang/en_'.'_list.lng';
67+
include($lng_file);
6568

6669
$this->wordbook = $wb;
6770

interface/lib/classes/listform_tpl_generator.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function buildHTML($listDef,$module = '') {
132132
}
133133
fclose($handle);
134134

135-
$lang["page_txt"] = 'Page';
135+
/*$lang["page_txt"] = 'Page';
136136
$lang["page_of_txt"] = 'of';
137137
$lang["page_next_txt"] = 'Next';
138138
$lang["page_back_txt"] = 'Back';
@@ -141,7 +141,7 @@ function buildHTML($listDef,$module = '') {
141141
$lang["add_new_record_txt"] = 'Add new record';
142142
143143
// save language file
144-
$this->lng_add($lang,$listDef,$module);
144+
$this->lng_add($lang,$listDef,$module);*/
145145
}
146146

147147
function lng_add($lang,$listDef,$module = '') {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
$wb["page_txt"] = 'Page';
3+
$wb["page_of_txt"] = 'of';
4+
$wb["page_next_txt"] = 'Next';
5+
$wb["page_back_txt"] = 'Back';
6+
$wb["delete_txt"] = 'Delete';
7+
$wb["filter_txt"] = 'Filter';
8+
$wb["add_new_record_txt"] = 'Add new record';
9+
?>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
$wb['page_txt'] = 'Pagina';
3+
$wb['page_of_txt'] = 'di';
4+
$wb['page_next_txt'] = 'Successiva';
5+
$wb['page_back_txt'] = 'Precedente';
6+
$wb['delete_txt'] = 'Cancella';
7+
$wb['filter_txt'] = 'Filtra';
8+
$wb['add_new_record_txt'] = 'Aggiungi nuovo record';
9+
?>

0 commit comments

Comments
 (0)