当前位置: 首页>>代码示例>>PHP>>正文


PHP Locale_Translate::_方法代码示例

本文整理汇总了PHP中Locale_Translate::_方法的典型用法代码示例。如果您正苦于以下问题:PHP Locale_Translate::_方法的具体用法?PHP Locale_Translate::_怎么用?PHP Locale_Translate::_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Locale_Translate的用法示例。


在下文中一共展示了Locale_Translate::_方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getAll

 public static function getAll()
 {
     $database_config_user = Database_Config_User::getInstance();
     $database_styles = Database_Styles::getInstance();
     $styles_logic = Styles_Logic::getInstance();
     $stylesheet = $database_config_user->getStylesheet();
     // The styles.
     $data = $database_styles->getMarkersAndNames($stylesheet);
     $lines = array();
     $lines[] = '<select id="styleslist">';
     $line = Locale_Translate::_("Select style");
     $lines[] = "<option>{$line}</option>";
     foreach ($data as $item) {
         $marker = $item['marker'];
         $data = $database_styles->getMarkerData($stylesheet, $marker);
         $category = $data['category'];
         $category = $styles_logic->categoryText($category);
         $line = $marker . " " . $item['name'] . " (" . $category . ")";
         $lines[] = "<option>{$line}</option>";
     }
     $lines[] = '</select>';
     // Link for cancelling.
     $lines[] = " ";
     $lines[] = '<a href="cancel">[' . Locale_Translate::_("cancel") . ']</a>';
     $html = implode("\n", $lines);
     return $html;
 }
开发者ID:alerque,项目名称:bibledit,代码行数:27,代码来源:styles.php

示例2: __construct

 public function __construct($header)
 {
     $this->view = new Assets_View(__FILE__);
     $caller_url = $_SERVER["PHP_SELF"] . "?" . http_build_query(array());
     $this->view->view->caller_url = $caller_url;
     $this->view->view->header = $header;
     $this->view->view->info_top = Locale_Translate::_("Here are the various options:");
     $this->view->view->info_bottom = Locale_Translate::_("Please pick one.");
 }
开发者ID:alerque,项目名称:bibledit,代码行数:9,代码来源:list2.php

示例3: setup

 /**
  * setup - Sets up a confirmation cycle in order to change something in the database.
  *         If e.g. the user requests the email address to be changed, an initial email will be
  *         sent, which the user should confirm.
  * $to - Email address for the initial email and the response.
  * $initial_subject - The subject of the initial email message.
  * $initial_body - The body of the initial email message.
  * $query - The query to be executed on the database if the user confirms the email successfully.
  * $subsequent_subject - The subject of the email to send upon user confirmation.
  * $subsequent_body - The body of the email to send upon user confirmation.
  */
 public function setup($to, $initial_subject, $initial_body, $query, $subsequent_subject, $subsequent_body)
 {
     $database_confirm = Database_Confirm::getInstance();
     $confirmation_id = $database_confirm->getNewID();
     $initial_subject .= " {$confirmation_id}";
     $initial_body .= "\n\n";
     $initial_body .= Locale_Translate::_("Please confirm this request by replying to this email. There is a confirmation number in the subject line. Your reply should have this same confirmation number in the subject line.");
     $database_mail = Database_Mail::getInstance();
     $database_mail->send($to, $initial_subject, $initial_body);
     $database_confirm->store($confirmation_id, $query, $to, $subsequent_subject, $subsequent_body);
 }
开发者ID:alerque,项目名称:bibledit,代码行数:22,代码来源:worker.php

示例4: client_demo_warning

 public static function client_demo_warning()
 {
     $warning = "";
     if (Filter_Client::enabled()) {
         $database_config_general = Database_Config_General::getInstance();
         $address = $database_config_general->getServerAddress();
         if ($address == self::demo_address()) {
             $warning = Locale_Translate::_("Warning:") . " " . Locale_Translate::_("The client is connected to a public demo server.") . " " . Locale_Translate::_("Everybody can modify the data on that server.") . " " . Locale_Translate::_("After send and receive your data will reflect the data on the server.");
         }
     }
     return $warning;
 }
开发者ID:alerque,项目名称:bibledit,代码行数:12,代码来源:demo.php

示例5: create

 /**
  * Creates book template with ID $book in Bible $bible.
  * If a $chapter is given instead of NULL, it creates that chapter only.
  */
 public static function create($bible, $book, $chapter, &$feedback)
 {
     $database_bibles = Database_Bibles::getInstance();
     $database_versifications = Database_Versifications::getInstance();
     $database_books = Database_Books::getInstance();
     $database_logs = Database_Logs::getInstance();
     $database_config_bible = Database_Config_Bible::getInstance();
     $bible_id = $database_bibles->getID($bible);
     if ($bible_id == 0) {
         $feedback[] = Locale_Translate::_("Bible {$bible} does not exist: Cannot create book");
         return false;
     }
     if ($book == 0) {
         $feedback[] = Locale_Translate::_("Invalid book while creating a book template");
         return false;
     }
     // The chapters that have been created.
     $chaptersCreated = array();
     // Chapter 0.
     if (!isset($chapter) || $chapter == 0) {
         $data = "\\id " . $database_books->getUsfmFromId($book) . "\n";
         $data .= "\\h " . $database_books->getEnglishFromId($book) . "\n";
         $data .= "\\toc2 " . $database_books->getEnglishFromId($book) . "\n";
         Bible_Logic::storeChapter($bible, $book, 0, $data);
         $chaptersCreated[] = 0;
     }
     // Subsequent chapters.
     $versification = $database_config_bible->getVersificationSystem($bible);
     $versification_data = $database_versifications->getBooksChaptersVerses($versification);
     foreach ($versification_data as $row) {
         if ($book == $row["book"]) {
             $ch = $row["chapter"];
             $verse = $row["verse"];
             if (!isset($chapter) || $chapter == $ch) {
                 $data = "\\c {$ch}\n";
                 $data .= "\\p\n";
                 for ($i = 1; $i <= $verse; $i++) {
                     $data .= "\\v {$i}\n";
                 }
                 Bible_Logic::storeChapter($bible, $book, $ch, $data);
                 $chaptersCreated[] = $ch;
             }
         }
     }
     // Done.
     if (count($chaptersCreated) == 0) {
         $feedback[] = Locale_Translate::_("No chapters have been craeted");
         return false;
     }
     $chaptersCreated = implode(" ", $chaptersCreated);
     $feedback[] = Locale_Translate::_("The following chapters have been created:") . " " . $chaptersCreated;
     return true;
 }
开发者ID:alerque,项目名称:bibledit,代码行数:57,代码来源:create.php

示例6: produceVerseLevel

 /**
  * This filter produces files in USFM, html and text format.
  * The text files are to be used for showing the differences between them.
  * The files contain all verses that differ.
  * $bible: The Bible to go through.
  * $directory: The existing directory where to put the files.
  * Two files are created: verses_old.usfm and verses_new.usfm.
  * The book chapter.verse precede each verse.
  */
 public static function produceVerseLevel($bible, $directory)
 {
     $database_bibles = Database_Bibles::getInstance();
     $database_modifications = Database_Modifications::getInstance();
     $database_books = Database_Books::getInstance();
     $database_config_bible = Database_Config_Bible::getInstance();
     $stylesheet = $database_config_bible->getExportStylesheet($bible);
     $old_vs_usfm = array();
     $new_vs_usfm = array();
     $filter_text_old = new Filter_Text($bible);
     $filter_text_old->html_text_standard = new Html_Text(Locale_Translate::_("Bible"));
     $filter_text_old->text_text = new Text_Text();
     $filter_text_new = new Filter_Text($bible);
     $filter_text_new->html_text_standard = new Html_Text(Locale_Translate::_("Bible"));
     $filter_text_new->text_text = new Text_Text();
     $books = $database_modifications->getTeamDiffBooks($bible);
     foreach ($books as $book) {
         $bookname = $database_books->getEnglishFromId($book);
         $chapters = $database_modifications->getTeamDiffChapters($bible, $book);
         foreach ($chapters as $chapter) {
             // Go through the combined verse numbers in the old and new chapter.
             $old_chapter_usfm = $database_modifications->getTeamDiff($bible, $book, $chapter);
             $new_chapter_usfm = $database_bibles->getChapter($bible, $book, $chapter);
             $old_verse_numbers = Filter_Usfm::getVerseNumbers($old_chapter_usfm);
             $new_verse_numbers = Filter_Usfm::getVerseNumbers($new_chapter_usfm);
             $verses = array_merge($old_verse_numbers, $new_verse_numbers);
             $verses = array_unique($verses);
             sort($verses, SORT_NUMERIC);
             foreach ($verses as $verse) {
                 $old_verse_text = Filter_Usfm::getVerseText($old_chapter_usfm, $verse);
                 $new_verse_text = Filter_Usfm::getVerseText($new_chapter_usfm, $verse);
                 if ($old_verse_text != $new_verse_text) {
                     $usfmCode = "\\p {$bookname} {$chapter}.{$verse} {$old_verse_text}";
                     $old_vs_usfm[] = $usfmCode;
                     $filter_text_old->addUsfmCode($usfmCode);
                     $usfmCode = "\\p {$bookname} {$chapter}.{$verse} {$new_verse_text}";
                     $new_vs_usfm[] = $usfmCode;
                     $filter_text_new->addUsfmCode($usfmCode);
                 }
             }
         }
     }
     file_put_contents("{$directory}/verses_old.usfm", implode("\n", $old_vs_usfm));
     file_put_contents("{$directory}/verses_new.usfm", implode("\n", $new_vs_usfm));
     $filter_text_old->run($stylesheet);
     $filter_text_new->run($stylesheet);
     $filter_text_old->html_text_standard->save("{$directory}/verses_old.html");
     $filter_text_new->html_text_standard->save("{$directory}/verses_new.html");
     $filter_text_old->text_text->save("{$directory}/verses_old.txt");
     $filter_text_new->text_text->save("{$directory}/verses_new.txt");
 }
开发者ID:alerque,项目名称:bibledit,代码行数:60,代码来源:diff.php

示例7: create

 public function create($breadcrumbs)
 {
     $tableElement = $this->htmlText->newTable();
     $tableRowElement = $this->htmlText->newTableRow($tableElement);
     $tableDataElement = $this->htmlText->newTableData($tableRowElement);
     if (is_array($breadcrumbs)) {
         $crumbAdded = false;
         foreach ($breadcrumbs as $breadcrumb) {
             if ($crumbAdded) {
                 $spanElement = $this->htmlText->newElement("span");
                 $spanElement->nodeValue = Filter_Html::sanitize("»");
                 $tableDataElement->appendChild($spanElement);
             }
             $this->htmlText->addLink($tableDataElement, $breadcrumb[1], "", $breadcrumb[0], "", ' ' . $breadcrumb[0] . ' ');
             $crumbAdded = true;
         }
     }
     $tableDataElement = $this->htmlText->newTableData($tableRowElement, true);
     $formElement = $this->htmlText->newElement("form");
     $tableDataElement->appendChild($formElement);
     $formElement->setAttribute("action", "../../../webbible/search.php");
     $formElement->setAttribute("method", "GET");
     $formElement->setAttribute("name", "search");
     $formElement->setAttribute("id", "search");
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("name", "q");
     $inputElement->setAttribute("type", "text");
     $inputElement->setAttribute("placeholder", Locale_Translate::_("Search the Bible"));
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("type", "image");
     $inputElement->setAttribute("name", "search");
     $inputElement->setAttribute("src", "lens.png");
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("type", "hidden");
     $inputElement->setAttribute("name", "url");
     $inputElement->setAttribute("value", $this->searchBackLinkUrl);
     $inputElement = $this->htmlText->newElement("input");
     $formElement->appendChild($inputElement);
     $inputElement->setAttribute("type", "hidden");
     $inputElement->setAttribute("name", "text");
     $inputElement->setAttribute("value", $this->searchBackLinkText);
 }
开发者ID:alerque,项目名称:bibledit,代码行数:45,代码来源:header.php

示例8: text

 public static function text($role)
 {
     switch ($role) {
         case self::GUEST_LEVEL:
             return Locale_Translate::_("Guest");
         case self::MEMBER_LEVEL:
             return Locale_Translate::_("Member");
         case self::CONSULTANT_LEVEL:
             return Locale_Translate::_("Consultant");
         case self::TRANSLATOR_LEVEL:
             return Locale_Translate::_("Translator");
         case self::MANAGER_LEVEL:
             return Locale_Translate::_("Manager");
         case self::ADMIN_LEVEL:
             return Locale_Translate::_("Administrator");
     }
     return Locale_Translate::_("Guest");
 }
开发者ID:alerque,项目名称:bibledit,代码行数:18,代码来源:roles.php

示例9: __construct

 /**
  * Dialog that presents the user with a list of options and asks the user to pick one.
  * $query: Array with the basic query parameters for the page where to go on clicking Cancel or making a choice.
  * $info_top, $info_bottom - If these are left empty, they take standard values.
  * $horizontal - if true the list of options shows horizontally, rather than vertically, and the $info_ does not show.
  */
 public function __construct($query, $header, $info_top, $info_bottom, $horizontal = false)
 {
     $this->view = new Assets_View(__FILE__);
     $caller_url = $_SERVER["PHP_SELF"];
     if (is_array($query)) {
         $full_query = array();
         foreach ($query as $value) {
             $full_query = array_merge($full_query, array($value => $_GET[$value]));
         }
         $caller_url .= "?" . http_build_query($full_query);
     }
     $this->view->view->caller_url = $caller_url;
     $this->view->view->header = $header;
     if ($info_top == "") {
         $info_top = Locale_Translate::_("Here are the various options:");
     }
     $this->view->view->info_top = $info_top;
     if ($info_bottom == "") {
         $info_bottom = Locale_Translate::_("Please pick one.");
     }
     $this->view->view->info_bottom = $info_bottom;
     $this->view->view->horizontal = $horizontal;
 }
开发者ID:alerque,项目名称:bibledit,代码行数:29,代码来源:list.php

示例10:

<li>
  <?php 
echo Locale_Translate::_("Can synchronize the local Consultation Notes with the Consultation Notes on a Bibledit-Web server.");
?>
</li>
<li>
  <?php 
echo Locale_Translate::_("After connecting to a server, the first time you synchronize, you will get the same data as on the server.");
?>
  <?php 
echo Locale_Translate::_("Local Bible data and Notes not on the server will be erased.");
?>
  <?php 
echo Locale_Translate::_("Bible data and Notes on the server will be downloaded.");
?>
  <?php 
echo Locale_Translate::_("This is good because it means that your data will be backed up to the server.");
?>
</li>
<li>
  <?php 
echo Locale_Translate::_("Does not send or receive email.");
?>
</li>
<li>
  <?php 
echo Locale_Translate::_("User is always logged in.");
?>
</li>
</ul>
开发者ID:alerque,项目名称:bibledit,代码行数:30,代码来源:client.php

示例11:

echo Locale_Translate::_("missing punctuation at the end of a verse");
?>
</p>

<p>
<a href="settings.php?patterns=">
<?php 
if ($this->check_patterns == true) {
    ?>
 ☑ <?php 
} else {
    ?>
 ☐ <?php 
}
?>
</a>
  <?php 
echo Locale_Translate::_("patterns in the text");
?>
  [<a href="settingspatterns.php"><?php 
echo Locale_Translate::_("settings");
?>
</a>]
</p>

<br>
<p><a href="settingssentences.php"><?php 
echo Locale_Translate::_("Settings for the sentence structure");
?>
</a></p>
开发者ID:alerque,项目名称:bibledit,代码行数:30,代码来源:settings.php

示例12: implode

// Store the verse USFM in the array.
$usfmArray[$verse] = $usfm;
// Create the updated chapter USFM as a string.
$usfm = implode("\n", $usfmArray);
$stylesheet = $database_config_user->getStylesheet();
$book_chapter_text = Filter_Usfm::import($usfm, $stylesheet);
foreach ($book_chapter_text as $data) {
    $book_number = $data[0];
    $chapter_number = $data[1];
    $chapter_data_to_save = $data[2];
    if (($book_number == $book || $book_number == 0) && $chapter_number == $chapter) {
        // Collect some data about the changes for this user.
        $username = $session_logic->currentUser();
        $oldID = $database_bibles->getChapterId($bible, $book, $chapter);
        $oldText = $database_bibles->getChapter($bible, $book, $chapter);
        // Safely store the chapter.
        $saved = Filter_Bibles::safeStoreChapter($bible, $book, $chapter, $chapter_data_to_save);
        if ($saved) {
            // Store details for the user's changes.
            $newID = $database_bibles->getChapterId($bible, $book, $chapter);
            $newText = $chapter_data_to_save;
            $database_modifications->recordUserSave($username, $bible, $book, $chapter, $oldID, $oldText, $newID, $newText);
            echo Locale_Translate::_("Saved");
        } else {
            echo Locale_Translate::_("Not saved because of too many changes");
        }
    } else {
        echo Locale_Translate::_("Save failure");
        $database_logs->log("The following data could not be saved and was discarded: " . $chapter_data_to_save);
    }
}
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:save.php

示例13: page_access_level

it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::TRANSLATOR_LEVEL);
$header = new Assets_Header(Locale_Translate::_("Order"));
$header->jQueryUIOn("sortable");
$header->run();
$view = new Assets_View(__FILE__);
$database_config_bible = Database_Config_Bible::getInstance();
$database_books = Database_Books::getInstance();
$database_bibles = Database_Bibles::getInstance();
$bible = Access_Bible::clamp($_GET['bible']);
$view->view->bible = Filter_Html::sanitize($bible);
@($reset = $_GET["reset"]);
if (isset($reset)) {
    $database_config_bible->setBookOrder($bible, "");
}
@($order = $_POST['order']);
if (isset($order)) {
    $order = explode(",", $order);
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:order.php

示例14: Copyright

<?php

/*
Copyright (©) 2003-2014 Teus Benschop.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
?>
<h1><?php 
echo Locale_Translate::_("Public");
?>
</h1>
<p><a href="bibleworks2esword.php"><?php 
echo Locale_Translate::_("Tool to convert a text file suitable for BibleWorks into a text file suitable for eSword");
?>
</a></p>
开发者ID:alerque,项目名称:bibledit,代码行数:28,代码来源:index.php

示例15: Copyright

<?php

/*
Copyright (©) 2003-2014 Teus Benschop.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once "../bootstrap/bootstrap.php";
page_access_level(Filter_Roles::CONSULTANT_LEVEL);
$database_notes = Database_Notes::getInstance();
$notes_logic = Notes_Logic::getInstance();
$database_users = Database_Users::getInstance();
$header = new Assets_Header(Locale_Translate::_("Severity"));
$header->run();
$view = new Assets_View(__FILE__);
$severities = $database_notes->getPossibleSeverities();
$view->view->severities = $severities;
$view->render("severity-n.php");
Assets_Page::footer();
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:severity-n.php


注:本文中的Locale_Translate::_方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。