fantu
2008-12-11 3505605c3295dcb54148110ea553d12a5204af92
- 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
2 files added
2 files modified
25 ■■■■■ changed files
interface/lib/classes/listform.inc.php 3 ●●●●● patch | view | raw | blame | history
interface/lib/classes/listform_tpl_generator.inc.php 4 ●●●● patch | view | raw | blame | history
interface/web/lang/lib/lang/en_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/lang/lib/lang/it_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/lib/classes/listform.inc.php
@@ -62,6 +62,9 @@
        $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_'.$this->listDef['name'].'_list.lng';
        if(!file_exists($lng_file)) $lng_file = 'lib/lang/en_'.$this->listDef['name'].'_list.lng';
        include($lng_file);
        $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);
        
        $this->wordbook = $wb;
        
interface/lib/classes/listform_tpl_generator.inc.php
@@ -132,7 +132,7 @@
        }
        fclose($handle);
        
        $lang["page_txt"] = 'Page';
        /*$lang["page_txt"] = 'Page';
        $lang["page_of_txt"] = 'of';
        $lang["page_next_txt"] = 'Next';
        $lang["page_back_txt"] = 'Back';
@@ -141,7 +141,7 @@
        $lang["add_new_record_txt"] = 'Add new record';
        
        // save language file
        $this->lng_add($lang,$listDef,$module);
        $this->lng_add($lang,$listDef,$module);*/
    }
    
    function lng_add($lang,$listDef,$module = '') {
interface/web/lang/lib/lang/en_list.lng
New file
@@ -0,0 +1,9 @@
<?php
$wb["page_txt"] = 'Page';
$wb["page_of_txt"] = 'of';
$wb["page_next_txt"] = 'Next';
$wb["page_back_txt"] = 'Back';
$wb["delete_txt"] = 'Delete';
$wb["filter_txt"] = 'Filter';
$wb["add_new_record_txt"] = 'Add new record';
?>
interface/web/lang/lib/lang/it_list.lng
New file
@@ -0,0 +1,9 @@
<?php
$wb['page_txt'] = 'Pagina';
$wb['page_of_txt'] = 'di';
$wb['page_next_txt'] = 'Successiva';
$wb['page_back_txt'] = 'Precedente';
$wb['delete_txt'] = 'Cancella';
$wb['filter_txt'] = 'Filtra';
$wb['add_new_record_txt'] = 'Aggiungi nuovo record';
?>