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


PHP dgettext函数代码示例

本文整理汇总了PHP中dgettext函数的典型用法代码示例。如果您正苦于以下问题:PHP dgettext函数的具体用法?PHP dgettext怎么用?PHP dgettext使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: SlideOrderedRepeatableComponentCollection

 function SlideOrderedRepeatableComponentCollection()
 {
     parent::WOrderedRepeatableComponentCollection();
     $this->_addButton->setLabel(_("Add a Text-Slide"));
     $this->_addFromBasketButton = WEventButton::withLabel(dgettext("polyphony", "Create Slides from Selection"));
     $this->_addFromBasketButton->setParent($this);
 }
开发者ID:adamfranco,项目名称:concerto,代码行数:7,代码来源:SlideOrderedRepeatableComponentCollection.class.php

示例2: getDisplayMessage

 /**
  * Function will return display message of exception if its set by the calle.
  * if it is not set then we are generating some default display messages based
  * on mapi error code.
  * @return string returns error-message that should be sent to client to display.
  */
 public function getDisplayMessage()
 {
     if (!empty($this->displayMessage)) {
         return $this->displayMessage;
     }
     switch ($this->getCode()) {
         case MAPI_E_NO_ACCESS:
             return dgettext("zarafa", "You have insufficient privileges to open this object.");
         case MAPI_E_LOGON_FAILED:
         case MAPI_E_UNCONFIGURED:
             return dgettext("zarafa", "Logon Failed. Please check your name/password.");
         case MAPI_E_NETWORK_ERROR:
             return dgettext("zarafa", "Can not connect to Zarafa server.");
         case MAPI_E_UNKNOWN_ENTRYID:
             return dgettext("zarafa", "Can not open object with provided id.");
         case MAPI_E_NO_RECIPIENTS:
             return dgettext("zarafa", "There are no recipients in the message.");
         case MAPI_E_NOT_FOUND:
             return dgettext("zarafa", "Can not find object.");
         case MAPI_E_NOT_ENOUGH_MEMORY:
             return dgettext("zarafa", "Operation failed: Server does not have enough memory.");
         case MAPI_E_INTERFACE_NOT_SUPPORTED:
         case MAPI_E_INVALID_PARAMETER:
         case MAPI_E_INVALID_ENTRYID:
         case MAPI_E_INVALID_OBJECT:
         case MAPI_E_TOO_COMPLEX:
         case MAPI_E_CORRUPT_DATA:
         case MAPI_E_END_OF_SESSION:
         case MAPI_E_AMBIGUOUS_RECIP:
         case MAPI_E_COLLISION:
         case MAPI_E_UNCONFIGURED:
         default:
             return sprintf(dgettext("zarafa", "Unknown MAPI Error: %s"), get_mapi_error_name($this->getCode()));
     }
 }
开发者ID:tuksik,项目名称:zarafa-rest-api,代码行数:41,代码来源:class.mapiexception.php

示例3: getHeadingText

 /**
  * Return the heading text for this action, or an empty string.
  * 
  * @return string
  * @access public
  * @since 4/26/05
  */
 function getHeadingText()
 {
     $harmoni = Harmoni::instance();
     $idManager = Services::getService("Id");
     $agentManager = Services::getService("Agent");
     // Get the id of the selected agent using $_REQUEST
     $harmoni->request->startNamespace("polyphony-authorizations");
     $mult = RequestContext::value("mult");
     $agents = RequestContext::value("agents");
     $idObject = $mult ? null : $idManager->getId(RequestContext::value("agentId"));
     //		$idObject =$idManager->getId(RequestContext::value("agentId"));
     $GLOBALS["agentId"] = $idObject;
     $harmoni->request->endNamespace();
     if ($mult) {
         return dgettext("polyphony", "Modify Authorizations for Multiple Agents");
     } else {
         if ($agentManager->isGroup($idObject)) {
             $agent = $agentManager->getGroup($idObject);
             return dgettext("polyphony", "Modify Authorizations for Group") . ": <em> " . $agent->getDisplayName() . "</em>";
         } else {
             if ($agentManager->isAgent($idObject)) {
                 $agent = $agentManager->getAgent($idObject);
                 return dgettext("polyphony", "Modify Authorizations for User") . ": <em> " . $agent->getDisplayName() . "</em>";
             } else {
                 return dgettext("polyphony", "Modify Authorizations for the User/Group Id") . ": <em> " . $idObject->getIdString() . "</em>";
             }
         }
     }
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:36,代码来源:edit_authorizations.act.php

示例4: ewatcher_translate

function ewatcher_translate($string)
{
    $ewatcher_domain = "messages";
    bindtextdomain($ewatcher_domain, "Modules/ewatcher/locale");
    bind_textdomain_codeset($ewatcher_domain, "UTF-8");
    return dgettext($ewatcher_domain, $string);
}
开发者ID:JSidrach,项目名称:ewatcher,代码行数:7,代码来源:ewatcher_translations.php

示例5: WVerifiedChangeInput

 /**
  * Constructor
  * 
  * @return object
  * @access public
  * @since 10/20/05
  */
 function WVerifiedChangeInput()
 {
     $this->_checkbox = new WCheckBox();
     $this->_checkbox->setParent($this);
     $this->_label = dgettext("polyphony", "Apply to All");
     $this->setChecked(true);
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:14,代码来源:WVerifiedChangeInput.class.php

示例6: getView

    public function getView()
    {
        $text = dgettext('users', 'Sign in');
        return <<<EOF
<a id = "sign-in" data-toggle = "modal" href = "#user-login-modal"><i class = "fa fa-user"></i> {$text}</a>
<div id="user-signin">
    <div class = "modal fade" id="user-login-modal" tabindex = "-1" role = "dialog" aria-labelledby = "userLoginModalLabel" aria-hidden = "true">
        <div id="user-login-dialog" class = "modal-dialog" style="max-width:50%; min-width:25%;">
            <div class = "modal-content">
                <div class = "modal-body">
                    <form method = "post" action = "index.php">
                        <input type = "hidden" name = "module" value = "users" />
                        <input type = "hidden" name = "action" value = "user" />
                        <input type = "hidden" name = "command" value = "login" />
                        <div class = "form-group">
                            <input type = "text" id = "phpws-username" name = "phpws_username" placeholder = "Username" class = "form-control" />
                        </div>
                        <div class = "form-group">
                            <input type = "password" name = "phpws_password" placeholder = "Password" class = "form-control" />
                        </div>
                        <input type = "submit" class = "btn btn-primary" value = "Sign in" />
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
EOF;
    }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:29,代码来源:local.php

示例7: users_register

/**
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @version $Id$
 */
function users_register($module, &$content)
{
    PHPWS_Core::initModClass('users', 'Permission.php');
    PHPWS_Core::initModClass('users', 'My_Page.php');
    $no_permissions = $no_my_page = FALSE;
    $result = Users_Permission::createPermissions($module);
    if (is_null($result)) {
        PHPWS_Boost::addLog('users', dgettext('users', 'Permissions file not implemented.'));
        $content[] = dgettext('users', 'Permissions file not implemented.');
        $no_permissions = TRUE;
    } elseif (PHPWS_Error::isError($result)) {
        $content[] = dgettext('users', 'Permissions table not created successfully.');
        PHPWS_Error::log($result);
        return FALSE;
    } else {
        $content[] = dgettext('users', 'Permissions table created successfully.');
    }
    $result = My_Page::registerMyPage($module);
    if (PHPWS_Error::isError($result)) {
        PHPWS_Boost::addLog('users', dgettext('users', 'A problem occurred when trying to register this module to My Page.'));
        $content[] = dgettext('users', 'A problem occurred when trying to register this module to My Page.');
        return FALSE;
    } elseif ($result != FALSE) {
        $content[] = dgettext('users', 'My Page registered to Users module.');
    } else {
        $no_my_page = TRUE;
    }
    // If the module doesn't have permissions or a My Page
    // then don't register the module
    if ($no_permissions && $no_my_page) {
        return FALSE;
    } else {
        return TRUE;
    }
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:39,代码来源:register.php

示例8: registerPermissions

 public static function registerPermissions($module, &$content)
 {
     $tableName = Users_Permission::getPermissionTableName($module);
     if (!PHPWS_DB::isTable($tableName)) {
         return Users_Permission::createPermissions($module);
     }
     $file = sprintf('%smod/%s/boost/permission.php', PHPWS_SOURCE_DIR, $module);
     if (!is_file($file)) {
         return NULL;
     }
     include_once $file;
     if (!isset($permissions) || !is_array($permissions)) {
         return TRUE;
     }
     $db = new PHPWS_DB($tableName);
     $columns = $db->getTableColumns();
     $columnSetting = 'smallint NOT NULL default \'0\'';
     foreach ($permissions as $perm_name => $perm_proper) {
         if (in_array($perm_name, $columns)) {
             continue;
         }
         $result = $db->addTableColumn($perm_name, $columnSetting);
         if (PHPWS_Error::isError($result)) {
             $content[] = sprintf(dgettext('users', 'Could not create "%s" permission column.'), $perm_name);
             PHPWS_Error::log($result);
         } else {
             $content[] = sprintf(dgettext('users', '"%s" permission column created.'), $perm_name);
         }
     }
     return TRUE;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:31,代码来源:Permission.php

示例9: _t

function _t($string, $domain = '')
{
    if ($domain == '' && defined('newLocale')) {
        $domain = newLocale;
    }
    return dgettext($domain, $string);
}
开发者ID:Mabahe,项目名称:webinterface,代码行数:7,代码来源:bootstrap.php

示例10: filecabinet_install

/**
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 */
function filecabinet_install(&$content)
{
    $home_dir = PHPWS_Boost::getHomeDir();
    $mm_dir = $home_dir . 'files/multimedia/';
    if (!is_dir($mm_dir)) {
        if (!@mkdir($mm_dir)) {
            $content[] = dgettext('filecabinet', 'Failed to create files/multimedia directory.');
            return false;
        } else {
            $content[] = dgettext('filecabinet', 'files/multimedia directory created successfully.');
        }
    }
    $files_dir = $home_dir . 'files/filecabinet/';
    if (!is_dir($files_dir)) {
        if (!@mkdir($files_dir)) {
            $content[] = dgettext('filecabinet', 'Failed to create files/filecabinet/ directory.');
            return false;
        } else {
            $content[] = dgettext('filecabinet', 'files/filecabinet/ directory created successfully.');
        }
    }
    $classify_dir = $home_dir . 'files/filecabinet/incoming/';
    if (!is_dir($classify_dir)) {
        if (!@mkdir($classify_dir)) {
            $content[] = dgettext('filecabinet', 'Failed to create files/filecabinet/incoming directory.');
            return false;
        } else {
            $content[] = dgettext('filecabinet', 'files/filecabinet/incoming directory created successfully.');
        }
    }
    return true;
}
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:36,代码来源:install.php

示例11: _T

 /**
  * alias for dgettext
  * if domain not specify, use $_GET['module'] instead
  **/
 function _T($var, $domain = null)
 {
     if ($domain == null && !empty($_GET['module'])) {
         $domain = $_GET['module'];
     }
     return dgettext($domain, $var);
 }
开发者ID:sebastiendu,项目名称:mmc,代码行数:11,代码来源:i18n.inc.php

示例12: update

 /**
  * Tells the wizard component to update itself - this may include getting
  * form post data or validation - whatever this particular component wants to
  * do every pageload. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return boolean - TRUE if everything is OK
  */
 function update($fieldName)
 {
     $val = RequestContext::value($fieldName);
     if ($val !== null && (!$this->_startingDisplay || $val != $this->_startingDisplay)) {
         $string = HtmlString::fromString($val);
         $string->cleanXSS();
         $this->_value = $string->asString();
         if (trim($this->_value) != trim($val)) {
             $this->_origErrorText = $this->getErrorText();
             $this->setErrorText(dgettext('polyphony', "The value you entered has been reformatted to meet XHTML validity standards."));
             // Add both error text if validation failed as well.
             if (!$this->validate()) {
                 $this->setErrorText($this->getErrorText() . " " . $this->_origErrorText);
             }
             $this->_showError = true;
             // Add a dummy rule if needed.
             if (!$this->getErrorRule()) {
                 $this->setErrorRule(new WECRegex('.*'));
             }
         } else {
             // Reset the original error text.
             if (isset($this->_origErrorText)) {
                 $this->setErrorText($this->_origErrorText);
             }
         }
     }
     return $this->validate();
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:37,代码来源:WSafeHtmlTextField.class.php

示例13: getLocalList

 public function getLocalList()
 {
     $self = $this;
     return array_map(function ($name) use($self) {
         return dgettext($self->getDatabase()->getIso(), $name);
     }, $this->_list);
 }
开发者ID:sokil,项目名称:php-isocodes,代码行数:7,代码来源:Subdivision.php

示例14: WRepeatableComponentCollection

 function WRepeatableComponentCollection()
 {
     $this->_addLabel = dgettext("polyphony", "Add");
     $this->_removeLabel = dgettext("polyphony", "Remove");
     $this->_addButton = WEventButton::withLabel($this->_addLabel);
     $this->_addButton->setParent($this);
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:7,代码来源:WRepeatableComponentCollection.class.php

示例15: translate

 private function translate($countryName)
 {
     if ($this->doNotTranslate) {
         return $countryName;
     }
     return dgettext(self::DOMAIN, $countryName);
 }
开发者ID:jou,项目名称:ymc-components,代码行数:7,代码来源:iso_3166.php


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