當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Localize::getText方法代碼示例

本文整理匯總了PHP中Localize::getText方法的典型用法代碼示例。如果您正苦於以下問題:PHP Localize::getText方法的具體用法?PHP Localize::getText怎麽用?PHP Localize::getText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Localize的用法示例。


在下文中一共展示了Localize::getText方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: validateData

 function validateData()
 {
     require_once "../classes/Localize.php";
     $loc = new Localize(OBIB_LOCALE, 'admin');
     $valid = true;
     if (!is_numeric($this->_sessionTimeout)) {
         $valid = false;
         $this->_sessionTimeoutError = $loc->getText("Session timeout must be numeric.");
     } elseif ($this->_sessionTimeout <= 0) {
         $valid = false;
         $this->_sessionTimeoutError = $loc->getText("Session timeout must be greater than 0.");
     }
     if (!is_numeric($this->_itemsPerPage)) {
         $valid = false;
         $this->_itemsPerPageError = $loc->getText("Items per page must be numeric.");
     } elseif ($this->_itemsPerPage <= 0) {
         $valid = false;
         $this->_itemsPerPageError = $loc->getText("Items per page must be greater than 0.");
     }
     if (!is_numeric($this->_purgeHistoryAfterMonths)) {
         $valid = false;
         $this->_purgeHistoryAfterMonthsError = $loc->getText("Months must be numeric.");
     }
     if (!is_numeric($this->_inactiveMemberAfterDays)) {
         $valid = false;
         $this->_inactiveMemberAfterDaysError = $loc->getText("Days must be numeric.");
     }
     return $valid;
 }
開發者ID:uniedpa,項目名稱:espabiblio,代碼行數:29,代碼來源:Settings.php

示例2: T

 function T($msg, $vars = NULL)
 {
     # Kludge to adapt 1.0-pre code to 0.6
     static $loc = NULL;
     if ($loc == NULL) {
         $loc = new Localize(OBIB_LOCALE, 'classes');
     }
     return $loc->getText($msg, $vars);
 }
開發者ID:AevumDecessus,項目名稱:docker-openbiblio,代碼行數:9,代碼來源:Form.php

示例3: __

 function __()
 {
     $arg_num = func_num_args();
     if ($arg_num == 1) {
         return Localize::getText(func_get_arg(0), Localize::getEncoding());
     } else {
         if ($arg_num > 1) {
             $args = array_merge(array(Localize::getText(func_get_arg(0), Localize::getEncoding())), array_slice(func_get_args(), 1));
             return call_user_func_array("sprintf", $args);
         }
     }
 }
開發者ID:ateliee,項目名稱:php_gettext_error,代碼行數:12,代碼來源:Localize.class.php

示例4: validateData

 function validateData()
 {
     $loc = new Localize(OBIB_LOCALE, "classes");
     $valid = true;
     if ($this->_isRequired and $this->_fieldData == "") {
         $valid = false;
         $this->_fieldDataError = $loc->getText("biblioFieldError1");
     }
     if ($this->_tag == "") {
         $valid = false;
         $this->_tagError = $loc->getText("biblioFieldError1");
     } else {
         if (!is_numeric($this->_tag)) {
             $valid = false;
             $this->_tagError = $loc->getText("biblioFieldError2");
         }
     }
     if ($this->_subfieldCd == "") {
         $valid = false;
         $this->_subfieldCdError = $loc->getText("biblioFieldError1");
     }
     unset($loc);
     return $valid;
 }
開發者ID:vishnu35,項目名稱:Granthalay,代碼行數:24,代碼來源:BiblioField.php

示例5: validateData

 function validateData()
 {
     $loc = new Localize(OBIB_LOCALE, "classes");
     $valid = true;
     if ($this->_isRequired and $this->_fieldData == "") {
         $valid = false;
         $this->_fieldDataError = $loc->getText("biblioFieldError1");
     }
     if ($this->_tag == "") {
         $valid = false;
         $this->_tagError = $loc->getText("biblioFieldError1");
     } else {
         if (!is_numeric($this->_tag)) {
             $valid = false;
             $this->_tagError = $loc->getText("biblioFieldError2");
         }
     }
     if ($this->_subfieldCd == "") {
         $valid = false;
         $this->_subfieldCdError = $loc->getText("biblioFieldError1");
     }
     // Check for image
     if ($this->getTag() == "902" && $this->getSubfieldCd() == "a") {
         $fieldData = $this->getFieldData();
         $index = $this->getTag() . $this->getSubfieldCd();
         if (!empty($fieldData["tmp_name"][$index])) {
             if ($info = getimagesize($fieldData["tmp_name"][$index])) {
                 $filename = $fieldData["name"][$index];
                 $filename_parts = explode(".", $filename);
                 unset($filename_parts[count($filename_parts) - 1]);
                 $filename = implode("-", $filename_parts);
                 $allow_types = array('image/jpeg', 'image/png', 'image/gif');
                 // If file type is allowed
                 if (in_array($info["mime"], $allow_types)) {
                     $ext = image_type_to_extension($info[2]);
                     $tmp = md5($filename . session_id() . time());
                     $filename = $filename . "_" . substr($tmp, strlen($tmp) - 7, strlen($tmp)) . $ext;
                     $filepath = "../pictures/{$filename}";
                     copy($fieldData["tmp_name"][$index], $filepath);
                     make_thumbnail($filepath, array('width' => 200));
                     $this->setFieldData($filename);
                 } else {
                     $valid = false;
                     $this->_fieldDataError = $loc->getText("biblioFieldErrorPictureType");
                 }
             } else {
                 $valid = false;
                 $this->_fieldDataError = $loc->getText("biblioFieldErrorPictureType");
             }
         }
     }
     unset($loc);
     return $valid;
 }
開發者ID:aimakun,項目名稱:odlib,代碼行數:54,代碼來源:BiblioField.php

示例6: header

    $_SESSION["postVars"] = $_POST;
    $_SESSION["pageErrors"] = $pageErrors;
    header("Location: ../admin/mbr_classify_new_form.php");
    exit;
}
#**************************************************************************
#*  Insert new domain table row
#**************************************************************************
$dmQ = new DmQuery();
$dmQ->connect();
$dmQ->insert("mbr_classify_dm", $dm);
$dmQ->close();
#**************************************************************************
#*  Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#*  Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("Classification type, %desc%, has been added.", array('desc' => $dm->getDescription()));
?>
<br><br>
<a href="../admin/mbr_classify_list.php"><?php 
echo $loc->getText("return to member classification list");
?>
</a>

<?php 
require_once "../shared/footer.php";
開發者ID:AevumDecessus,項目名稱:docker-openbiblio,代碼行數:31,代碼來源:mbr_classify_new.php

示例7: Localize

<?php

require_once "../shared/common.php";
$tab = "home";
$nav = "license";
include "../shared/header.php";
$loc = new Localize(OBIB_LOCALE, $tab);
?>
<h1><?php 
echo $loc->getText("licenseHeading");
?>
</h1>

<br>

<pre>
<a href="#en">Versión oficial en ingles</a>
<a href="#espa">Versión no oficial en español</a></br></br>

</br><a name="en">Versión oficial en ingles</a></br>
GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
開發者ID:Giordano-Bruno,項目名稱:GiordanoBruno,代碼行數:31,代碼來源:license.php

示例8: H

">
    <td width="100%" class="title" valign="top">
       <?php 
if (OBIB_LIBRARY_IMAGE_URL != "") {
    echo "<img align=\"middle\" src=\"" . H(OBIB_LIBRARY_IMAGE_URL) . "\" border=\"0\">";
}
if (!OBIB_LIBRARY_USE_IMAGE_ONLY) {
    echo " " . H(OBIB_LIBRARY_NAME);
}
?>
    </td>
    <td valign="top">
      <table class="primary" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="title" nowrap="yes"><font class="small"><?php 
echo $headerLoc->getText("headerTodaysDate");
?>
</font></td>
          <td class="title" nowrap="yes"><font class="small"><?php 
echo H(date($headerLoc->getText("headerDateFormat")));
?>
</font></td>
        </tr>
        <tr>
          <td class="title" nowrap="yes"><font class="small"><?php 
if (OBIB_LIBRARY_HOURS != "") {
    echo $headerLoc->getText("headerLibraryHours");
}
?>
</font></td>
          <td class="title" nowrap="yes"><font class="small"><?php 
開發者ID:sandbergja,項目名稱:obiblio-base,代碼行數:31,代碼來源:header_top.php

示例9: Localize

<?php

/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */
require_once "../shared/common.php";
$tab = "home";
$nav = "home";
require_once "../shared/header.php";
require_once "../classes/Localize.php";
$loc = new Localize(OBIB_LOCALE, $tab);
?>
<h1><?php 
echo $loc->getText("indexHeading");
?>
</h1>

<?php 
# echo $loc->getText("searchResults",array("items"=>0))."<br>";
?>

<?php 
echo $loc->getText("indexIntro");
?>

<br><br>
<table class="primary">
  <tr>
    <th><?php 
echo $loc->getText("indexTab");
?>
開發者ID:vishnu35,項目名稱:Granthalay,代碼行數:31,代碼來源:index.php

示例10: REL

<script language="JavaScript1.1" >
/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */

// JavaScript Document
//------------------------------------------------------------------------------
// lookup Javascript
lkup = {
<?php 
require_once REL(__FILE__, "../classes/Localize.php");
$jsLoc = new Localize(OBIB_LOCALE, $tab);
echo "z3950Search\t\t\t\t:'" . $jsLoc->getText("lookup_z3950Search") . "',\n";
echo "isbn\t\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_isbn") . "',\n";
echo "issn\t\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_issn") . "',\n";
echo "lccn\t\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_lccn") . "',\n";
echo "title\t\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_title") . "',\n";
echo "author\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_author") . "',\n";
echo "keyword\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_keyword") . "',\n";
echo "publisher\t\t\t\t\t:'" . $jsLoc->getText("lookup_publisher") . "',\n";
echo "pubLoc\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_pubLoc") . "',\n";
echo "pubDate\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_pubDate") . "',\n";
echo "andOpt\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_andOpt") . "',\n";
echo "search\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_search") . "',\n";
echo "abandon\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_abandon") . "',\n";
echo "repository\t\t\t\t:'" . $jsLoc->getText("lookup_repository") . "',\n";
echo "yaz_setup_failed\t:'" . $jsLoc->getText("lookup_yazSetupFailed") . "',\n";
echo "badQuery\t\t\t\t\t:'" . $jsLoc->getText("lookup_badQuery") . "',\n";
echo "patience\t\t\t\t\t:'" . $jsLoc->getText("lookup_patience") . "',\n";
echo "resetInstr\t\t\t\t:'" . $jsLoc->getText("lookup_resetInstr") . "',\n";
echo "goBack\t\t\t\t\t\t:'" . $jsLoc->getText("lookup_goBack") . "',\n";
開發者ID:AevumDecessus,項目名稱:docker-openbiblio,代碼行數:31,代碼來源:lookupJs.php

示例11: REL

$focus_form_field = "protocol";
require_once REL(__FILE__, "../functions/inputFuncs.php");
require_once REL(__FILE__, "../shared/logincheck.php");
require_once REL(__FILE__, "../shared/header.php");
require_once REL(__FILE__, "../classes/Localize.php");
$loc = new Localize(OBIB_LOCALE, $tab);
?>

<form id="editForm" name="editForm" method="POST" >
<h5 id="updateMsg"></h5>
<table class="primary">
	<tbody>
  <tr>
    <th colspan="2" nowrap="yes" align="left">
      <?php 
echo $loc->getText("lookup_optsSettings");
?>
    </th>
  </tr>
  <tr>
    <td nowrap="true" class="primary">
      <label for="protocol"><?php 
echo $loc->getText("lookup_optsProtocol");
?>
</label>
    </td>
    <td valign="top" class="primary">
      <select id="protocol" name="protocol">
        <option value="   ">   </option>
        <option value="YAZ">YAZ</option>
        <option value="SRU">SRU</option>
開發者ID:AevumDecessus,項目名稱:docker-openbiblio,代碼行數:31,代碼來源:lookupOptsForm.php

示例12: postVarsToBiblio

        require_once "../shared/logincheck.php";
        showForm($postVars);
    } else {
        $restrictInDemo = true;
        require_once "../shared/logincheck.php";
        $biblio = postVarsToBiblio($postVars);
        $pageErrors = array();
        if (!$biblio->validateData()) {
            $pageErrors = array_merge($pageErrors, biblioToPageErrors($biblio));
        }
        $pageErrors = array_merge($pageErrors, customFieldErrors($biblio));
        if (!empty($pageErrors)) {
            showForm($postVars, $pageErrors);
        } else {
            $bibid = insertBiblio($biblio);
            $msg = $loc->getText("biblioNewSuccess");
            header("Location: ../shared/biblio_view.php?bibid=" . U($bibid) . "&msg=" . U($msg));
        }
    }
}
function postVarsToBiblio($post)
{
    require_once "../classes/Biblio.php";
    require_once "../classes/BiblioField.php";
    $biblio = new Biblio();
    $biblio->setMaterialCd($post["materialCd"]);
    $biblio->setCollectionCd($post["collectionCd"]);
    $biblio->setCallNmbr1($post["callNmbr1"]);
    $biblio->setCallNmbr2($post["callNmbr2"]);
    $biblio->setCallNmbr3($post["callNmbr3"]);
    $biblio->setLastChangeUserid($_SESSION["userid"]);
開發者ID:vishnu35,項目名稱:opencitylibrary,代碼行數:31,代碼來源:biblio_new.php

示例13: header

#*  Checking for post vars.  Go back to form if none found.
#****************************************************************************
if (count($_POST) == 0 && count($_GET) == 0) {
    header("Location: ../circ/checkin_form.php?reset=Y");
    exit;
}
if ($_GET[barcodeNmbr]) {
    $barcode = trim($_GET[barcodeNmbr]);
} else {
    $barcode = trim($_POST["barcodeNmbr"]);
}
#****************************************************************************
#*  Edit input
#****************************************************************************
if (!ctypeAlnum($barcode)) {
    $pageErrors["barcodeNmbr"] = $loc->getText("shelvingCartErr1");
    $postVars["barcodeNmbr"] = $barcode;
    $_SESSION["postVars"] = $postVars;
    $_SESSION["pageErrors"] = $pageErrors;
    header("Location: ../circ/checkin_form.php");
    exit;
}
#****************************************************************************
#*  Ready copy record
#****************************************************************************
$copyQ = new BiblioCopyQuery();
$copyQ->connect();
if ($copyQ->errorOccurred()) {
    $copyQ->close();
    displayErrorPage($copyQ);
}
開發者ID:Giordano-Bruno,項目名稱:GiordanoBruno,代碼行數:31,代碼來源:shelving_cart.php

示例14: bibidToPostVars

        }
        showForm($postVars);
    } else {
        $restrictInDemo = true;
        require_once "../shared/logincheck.php";
        $biblio = postVarsToBiblio($postVars);
        $pageErrors = array();
        if (!$biblio->validateData()) {
            $pageErrors = array_merge($pageErrors, biblioToPageErrors($biblio));
        }
        $pageErrors = array_merge($pageErrors, customFieldErrors($biblio));
        if (!empty($pageErrors)) {
            showForm($postVars, $pageErrors);
        } else {
            updateBiblio($biblio);
            $msg = $loc->getText("biblioEditSuccess");
            header("Location: ../shared/biblio_view.php?bibid=" . U($postVars['bibid']) . "&msg=" . U($msg));
        }
    }
}
function bibidToPostVars($bibid)
{
    require_once "../classes/BiblioQuery.php";
    $biblioQ = new BiblioQuery();
    $biblioQ->connect();
    if ($biblioQ->errorOccurred()) {
        $biblioQ->close();
        displayErrorPage($biblioQ);
    }
    if (!($biblio = $biblioQ->doQuery($bibid))) {
        $biblioQ->close();
開發者ID:vishnu35,項目名稱:opencitylibrary,代碼行數:31,代碼來源:biblio_edit.php

示例15: H

}
if (!$staffQ->insert($staff)) {
    $staffQ->close();
    displayErrorPage($staffQ);
}
$staffQ->close();
#**************************************************************************
#*  Destroy form values and errors
#**************************************************************************
unset($_SESSION["postVars"]);
unset($_SESSION["pageErrors"]);
#**************************************************************************
#*  Show success page
#**************************************************************************
require_once "../shared/header.php";
echo $loc->getText("adminStaff_Staffmember");
?>
 <?php 
echo H($staff->getFirstName());
?>
 <?php 
echo H($staff->getLastName());
echo $loc->getText("adminStaff_new_Added");
?>
<br><br>
<a href="../admin/staff_list.php"><?php 
echo $loc->getText("adminStaff_Return");
?>
</a>

<?php 
開發者ID:AevumDecessus,項目名稱:docker-openbiblio,代碼行數:31,代碼來源:staff_new.php


注:本文中的Localize::getText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。