diff --git a/admin/admin_template/default/function.php b/admin/admin_template/default/function.php index 1e7c140d..ca88784e 100644 --- a/admin/admin_template/default/function.php +++ b/admin/admin_template/default/function.php @@ -74,7 +74,7 @@ function main_menu() } } } - $_menu .= '
  • Logout
  • '; + $_menu .= '
  • ' . __('Logout') . '
  • '; $_menu .= ''; echo $_menu; } diff --git a/admin/index.php b/admin/index.php index 47d87c77..f1a1fcad 100755 --- a/admin/index.php +++ b/admin/index.php @@ -41,7 +41,7 @@ } // page title -$page_title = $sysconf['library_name'].' :: Library Automation System'; +$page_title = $sysconf['library_name'].' :: '.__('Library Automation System'); // main menu $module = new module(); $module->setModulesDir(MDLBS); diff --git a/admin/modules/bibliography/z3950.php b/admin/modules/bibliography/z3950.php index c66c1b13..636a7c80 100755 --- a/admin/modules/bibliography/z3950.php +++ b/admin/modules/bibliography/z3950.php @@ -47,10 +47,10 @@ } if (!extension_loaded('yaz')) { - die('
    YAZ extension library is not loaded/installed yet. ' + die('
    '.__('YAZ extension library is not loaded/installed yet. ' .'YAZ library is needed to use z3950 enabled service. ' .'Please refer to official YAZ PHP Manual' - .' on how to setup/install YAZ extension library in PHP.
    '); + .' on how to setup/install YAZ extension library in PHP.').'
    '); } if (isset($_GET['z3950_source'])) { @@ -167,7 +167,7 @@ } // destroy result Z3950 session unset($_SESSION['z3950result']); - utility::jsAlert($r.' records inserted to database.'); + utility::jsAlert(str_replace('{recordCount}', $r, __('{recordCount} records inserted into the database.'))); echo ''; exit(); } @@ -227,7 +227,7 @@ // echo htmlentities($xml_result_string); if ($hits > 0) { - echo '
    Found '.$hits.' records from Z3950 Server, '.$sysconf['z3950_max_result'].' listed.
    '; + echo '
    ' . str_replace(array('{hits}', '{maxHits}'),array($hits, $sysconf['z3950_max_result']),__('Found {hits} records from Z3950 Server, {maxHits} listed.')) . '
    '; // parse XML $xmlrec = marcXMLsenayan($xml_result_string); // save it to session vars for retrieving later @@ -236,7 +236,7 @@ echo '
    '; echo ''; echo ''; - echo ''; + echo ''; echo ''; // loop records $row = 1; @@ -258,10 +258,10 @@ } echo ''; } else { - echo '
    No Results Found!
    '; + echo '
    ' . __('No Results Found!') . '
    '; } } else { - echo '
    No Keywords Supplied!
    '; + echo '
    ' . __('No Keywords Supplied!') . '
    '; } exit(); } diff --git a/admin/modules/bibliography/z3950sru.php b/admin/modules/bibliography/z3950sru.php index e9d1ba28..65f614c9 100755 --- a/admin/modules/bibliography/z3950sru.php +++ b/admin/modules/bibliography/z3950sru.php @@ -166,7 +166,7 @@ // destroy result Z3950 session unset($_SESSION['z3950result']); - utility::jsAlert($r.' records inserted to database.'); + utility::jsAlert(str_replace('{recordCount}', $r, __('{recordCount} records inserted into the database.'))); echo ''; exit(); } @@ -194,11 +194,11 @@ $hits = $zs_xml->numberOfRecords; if ($hits > 0) { - echo '
    Found '.$hits.' records from Z3950 SRU Server.
    '; + echo '
    ' . str_replace('{hits}', $hits,__('Found {hits} records from Z3950 SRU Server.')) . '
    '; echo ''; echo '
    '; echo ''; - echo ''; + echo ''; echo ''; $row = 1; foreach ($zs_xml->records->record as $rec) { @@ -230,10 +230,10 @@ } echo ''; } else { - echo '
    No Results Found!
    '; + echo '
    ' . __('No Results Found!') . '
    '; } } else { - echo '
    No Keywords Supplied!
    '; + echo '
    ' . __('No Keywords Supplied!') . '
    '; } exit(); } diff --git a/admin/modules/serial_control/index.php b/admin/modules/serial_control/index.php index 60a70f10..f22fa8ef 100755 --- a/admin/modules/serial_control/index.php +++ b/admin/modules/serial_control/index.php @@ -82,7 +82,7 @@ function subscriptionDetail($obj_db, $array_data) { global $can_read, $can_write, $count; - $_output = '
    '.$array_data[1].' ('.$array_data[2].')
    '; + $_output = '
    '.$array_data[1].' ('.$array_data[2].')
    '; if ($can_read AND $can_write) { $_output .= '   '; } diff --git a/admin/modules/system/index.php b/admin/modules/system/index.php index c6c4b753..a05854e1 100755 --- a/admin/modules/system/index.php +++ b/admin/modules/system/index.php @@ -226,7 +226,7 @@ $form->addSelectList('opac_result_num', __('Number Of Collections To Show In OPAC Result List'), $result_num_options, $sysconf['opac_result_num'] ); // homepage setting -$promote_options[] = array('1', 'Yes'); +$promote_options[] = array('1', __('Yes')); $form->addCheckBox('enable_promote_titles', __('Show Promoted Titles at Homepage'), $promote_options, $sysconf['enable_promote_titles']?'1':'0'); // enable quick return diff --git a/lib/contents/show_detail.inc.php b/lib/contents/show_detail.inc.php index 4c52f13e..ea44cd69 100755 --- a/lib/contents/show_detail.inc.php +++ b/lib/contents/show_detail.inc.php @@ -108,8 +108,8 @@ $info .= ''.__('Back To Previous').''; } if (isset($sysconf['enable_xml_detail']) && $sysconf['enable_xml_detail'] && !defined('LIGHTWEIGHT_MODE')) { - $info .= 'XML Detail'; - $info .= 'Cite this'; + $info .= ''.__('XML Detail').''; + $info .= ''.__('Cite this').''; } // output the record detail diff --git a/lib/module.inc.php b/lib/module.inc.php index 9eb841c3..b1a3e06a 100755 --- a/lib/module.inc.php +++ b/lib/module.inc.php @@ -33,9 +33,13 @@ class module extends simbio private $modules_dir = 'modules'; private $module_table = 'mst_module'; public $module_list = array(); - public $appended_first = '
  • Home
  • OPAC
  • '; - public $appended_last = '
  • LOGOUT
  • '; + public $appended_first; + public $appended_last; + public function __construct() { + $this->appended_first = '
  • ' . __('Home') . '
  • ' . __('OPAC') . '
  • '; + $this->appended_last = '
  • ' . __('LOGOUT') . '
  • '; + } /** * Method to set modules directory diff --git a/template/classic/biblio_list_template.php b/template/classic/biblio_list_template.php index bc5cfa15..7b128e36 100644 --- a/template/classic/biblio_list_template.php +++ b/template/classic/biblio_list_template.php @@ -78,11 +78,11 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret $xml_button = ''; $detail_button = ''.__('Record Detail').''; if ($settings['xml_detail']) { - $xml_button = 'XML Detail'; + $xml_button = ''.__('XML Detail').''; } // citation button - $cite_button = 'description'; + $cite_button = 'description'; // cover images var $image_cover = ''; @@ -148,7 +148,7 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret if ($_total_avail < 1) { $output .= '
    '.$field_opts[1].' : '.__('none copy available').'
    '; } else { - $item_availability_message = $_total_avail.' copies available for loan'; + $item_availability_message = str_replace('{numberAvailable}' , $_total_avail, __('{numberAvailable} copies available for loan')); $output .= '
    '.$field_opts[1].' : '.$item_availability_message.'
    '; } } else if ($field == 'node_id' && $settings['disable_item_data']) { @@ -164,13 +164,13 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret $detail_url_encoded = urlencode('http://'.$_SERVER['SERVER_NAME'].$detail_url); $_share_btns = "\n".''."\n"; // $output .= $_share_btns; diff --git a/template/classic/citation/apa_style_template.php b/template/classic/citation/apa_style_template.php index ede8c555..97152b68 100644 --- a/template/classic/citation/apa_style_template.php +++ b/template/classic/citation/apa_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    APA Style

    +

    .(). (). diff --git a/template/classic/citation/chicago_style_template.php b/template/classic/citation/chicago_style_template.php index d3db213e..075a4d3b 100644 --- a/template/classic/citation/chicago_style_template.php +++ b/template/classic/citation/chicago_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    Chicago Style

    +

    .. diff --git a/template/classic/citation/mla_style_template.php b/template/classic/citation/mla_style_template.php index 5e102457..13971575 100644 --- a/template/classic/citation/mla_style_template.php +++ b/template/classic/citation/mla_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    MLA Style

    +

    .. diff --git a/template/classic/citation/turabian_style_template.php b/template/classic/citation/turabian_style_template.php index 0a7fd845..19397a34 100644 --- a/template/classic/citation/turabian_style_template.php +++ b/template/classic/citation/turabian_style_template.php @@ -20,7 +20,7 @@ } ?>

    -

    Turabian Style

    +

    .. diff --git a/template/default/biblio_list_template.php b/template/default/biblio_list_template.php index 5ba95560..ed5ff9b0 100644 --- a/template/default/biblio_list_template.php +++ b/template/default/biblio_list_template.php @@ -78,11 +78,11 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret $xml_button = ''; $detail_button = ''.__('Record Detail').''; if ($settings['xml_detail']) { - $xml_button = 'XML Detail'; + $xml_button = ''.__('XML Detail').''; } // citation button - $cite_button = 'Cite'; + $cite_button = ''.__('Cite').''; // cover images var $image_cover = ''; @@ -143,7 +143,7 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret if ($_total_avail < 1) { $output .= '
    '.$field_opts[1].' : '.__('none copy available').'
    '; } else { - $item_availability_message = $_total_avail.' copies available for loan'; + $item_availability_message = str_replace('{numberAvailable}' , $_total_avail, __('{numberAvailable} copies available for loan')); $output .= '
    '.$field_opts[1].' : '.$item_availability_message.'
    '; } } else if ($field == 'node_id' && $settings['disable_item_data']) { @@ -164,13 +164,13 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret $detail_url_encoded = urlencode('http://'.$_SERVER['SERVER_NAME'].$detail_url); $_share_btns = "\n".''."\n"; $output .= $_share_btns; diff --git a/template/default/citation/apa_style_template.php b/template/default/citation/apa_style_template.php index ede8c555..97152b68 100644 --- a/template/default/citation/apa_style_template.php +++ b/template/default/citation/apa_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    APA Style

    +

    .(). (). diff --git a/template/default/citation/chicago_style_template.php b/template/default/citation/chicago_style_template.php index d3db213e..075a4d3b 100644 --- a/template/default/citation/chicago_style_template.php +++ b/template/default/citation/chicago_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    Chicago Style

    +

    .. diff --git a/template/default/citation/mla_style_template.php b/template/default/citation/mla_style_template.php index 5e102457..13971575 100644 --- a/template/default/citation/mla_style_template.php +++ b/template/default/citation/mla_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    MLA Style

    +

    .. diff --git a/template/default/citation/turabian_style_template.php b/template/default/citation/turabian_style_template.php index 0a7fd845..19397a34 100644 --- a/template/default/citation/turabian_style_template.php +++ b/template/default/citation/turabian_style_template.php @@ -20,7 +20,7 @@ } ?>

    -

    Turabian Style

    +

    .. diff --git a/template/default/index_template.inc.php b/template/default/index_template.inc.php index 42502a1b..65465ffe 100644 --- a/template/default/index_template.inc.php +++ b/template/default/index_template.inc.php @@ -108,7 +108,7 @@ // Generate Output // catch empty list if(strlen($main_content) == 7) { - echo '

    No Result


    Please try again

    '; + echo '

    ' . __('No Result') . '


    ' . __('Please try again') . '

    '; } else { echo $main_content; } diff --git a/template/lightweight/biblio_list_template.php b/template/lightweight/biblio_list_template.php index 5ba95560..ed5ff9b0 100644 --- a/template/lightweight/biblio_list_template.php +++ b/template/lightweight/biblio_list_template.php @@ -78,11 +78,11 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret $xml_button = ''; $detail_button = ''.__('Record Detail').''; if ($settings['xml_detail']) { - $xml_button = 'XML Detail'; + $xml_button = ''.__('XML Detail').''; } // citation button - $cite_button = 'Cite'; + $cite_button = ''.__('Cite').''; // cover images var $image_cover = ''; @@ -143,7 +143,7 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret if ($_total_avail < 1) { $output .= '
    '.$field_opts[1].' : '.__('none copy available').'
    '; } else { - $item_availability_message = $_total_avail.' copies available for loan'; + $item_availability_message = str_replace('{numberAvailable}' , $_total_avail, __('{numberAvailable} copies available for loan')); $output .= '
    '.$field_opts[1].' : '.$item_availability_message.'
    '; } } else if ($field == 'node_id' && $settings['disable_item_data']) { @@ -164,13 +164,13 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret $detail_url_encoded = urlencode('http://'.$_SERVER['SERVER_NAME'].$detail_url); $_share_btns = "\n".''."\n"; $output .= $_share_btns; diff --git a/template/lightweight/citation/apa_style_template.php b/template/lightweight/citation/apa_style_template.php index ede8c555..97152b68 100644 --- a/template/lightweight/citation/apa_style_template.php +++ b/template/lightweight/citation/apa_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    APA Style

    +

    .(). (). diff --git a/template/lightweight/citation/chicago_style_template.php b/template/lightweight/citation/chicago_style_template.php index d3db213e..075a4d3b 100644 --- a/template/lightweight/citation/chicago_style_template.php +++ b/template/lightweight/citation/chicago_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    Chicago Style

    +

    .. diff --git a/template/lightweight/citation/mla_style_template.php b/template/lightweight/citation/mla_style_template.php index 5e102457..13971575 100644 --- a/template/lightweight/citation/mla_style_template.php +++ b/template/lightweight/citation/mla_style_template.php @@ -17,7 +17,7 @@ ?>

    -

    MLA Style

    +

    .. diff --git a/template/lightweight/citation/turabian_style_template.php b/template/lightweight/citation/turabian_style_template.php index 0a7fd845..19397a34 100644 --- a/template/lightweight/citation/turabian_style_template.php +++ b/template/lightweight/citation/turabian_style_template.php @@ -20,7 +20,7 @@ } ?>

    -

    Turabian Style

    +

    .. diff --git a/template/lightweight/index_template.inc.php b/template/lightweight/index_template.inc.php index a59598ae..7cd620f6 100644 --- a/template/lightweight/index_template.inc.php +++ b/template/lightweight/index_template.inc.php @@ -108,7 +108,7 @@ // Generate Output // catch empty list if(strlen($main_content) == 7) { - echo '

    No Result


    Please try again

    '; + echo '

    ' . __('No Result') . '


    ' . __('Please try again') . '

    '; } else { echo $main_content; }