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


PHP Language::getNativeName方法代码示例

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


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

示例1: getLanguageName

 /**
  * A simple way to get the name of the language the article is
  * written in.  The value is cached in case there are multiple
  * calls to this function.
  *
  * @return string
  */
 public function getLanguageName()
 {
     if (is_null($this->m_languageName)) {
         $language = new Language($this->m_data['IdLanguage']);
         $this->m_languageName = $language->getNativeName();
     }
     return $this->m_languageName;
 } // fn getLanguageName
开发者ID:nistormihai,项目名称:Newscoop,代码行数:15,代码来源:Article.php

示例2: Article

    camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()));
    exit;
}
$articleObj = new Article($languageId, $articleNumber);
if (!$articleObj->exists()) {
    camp_html_display_error(getGS('Article does not exist.'));
    exit;
}
$translationLanguageObj = new Language($f_translation_language);
if (!$translationLanguageObj->exists()) {
    camp_html_display_error(getGS('Language does not exist.'));
    exit;
}
$translationArticle = new Article($f_translation_language, $articleNumber);
if ($translationArticle->exists()) {
    camp_html_add_msg(getGS("The article has already been translated into \$1.", $translationLanguageObj->getNativeName()));
    camp_html_goto_page($backLink);
}
$f_publication_id = $articleObj->getPublicationId();
// Only create the translated issue and section if the article has been
// categorized.
if ($f_publication_id > 0) {
    $publicationObj = new Publication($f_publication_id);
    if (!$publicationObj->exists()) {
        camp_html_display_error(getGS('Publication does not exist.'), $backLink);
        exit;
    }
    $f_issue_number = $articleObj->getIssueNumber();
    $issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
    if (!$issueObj->exists()) {
        camp_html_display_error(getGS('No such issue.'), $backLink);
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_translate.php

示例3: array

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php 
echo $translator->trans("Delete country", array(), 'country');
?>
 </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
	<BLOCKQUOTE>
	<LI><?php 
echo $translator->trans('The country $1 could not be deleted.', array('$1' => '<B>' . htmlspecialchars($country->getName()) . '(' . htmlspecialchars($language->getNativeName()) . ')</B>'), 'country');
?>
</LI>
	</BLOCKQUOTE>
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
	<DIV ALIGN="CENTER">
	<INPUT TYPE="button" class="button" NAME="OK" VALUE="<?php 
echo $translator->trans('OK');
?>
" ONCLICK="location.href='/<?php 
p($ADMIN);
?>
/country/'">
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_del.php

示例4: p

        }
        ?>
>
		<?php 
        p(htmlspecialchars($country->getName()));
        ?>
&nbsp;
	</TD>
	<?php 
    }
    ?>

	<TD>
	<?php 
    $language = new Language($country->getLanguageId());
    p(htmlspecialchars($language->getNativeName()));
    ?>
	</TD>

	<TD ALIGN="CENTER">
	<?php 
    p(htmlspecialchars($country->getCode()));
    ?>
    </TD>

    <?php 
    if ($g_user->hasPermission("ManageCountries")) {
        ?>
		<TD ALIGN="CENTER">
			<A HREF="/<?php 
        p($ADMIN);
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:index.php

示例5: camp_html_breadcrumbs

$crumbs[] = array(getGS("Deleting language"), "");
echo camp_html_breadcrumbs($crumbs);

?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php  putGS("Deleting language"); ?> </B>
		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
	   <BLOCKQUOTE>
		<LI><?php  putGS('The language $1 could not be deleted.','<B>'.$languageObj->getNativeName().'</B>'); ?></LI>
        <?php
        foreach ($errorMsgs as $error) { ?>
            <LI><?php p($error); ?></LI>
            <?php
        }
        ?>
	   </BLOCKQUOTE>
	</TD>
</TR>
<TR>
	<TD COLSPAN="2">
    	<DIV ALIGN="CENTER">
        	<INPUT TYPE="button" class="button" NAME="OK" VALUE="<?php  putGS('OK'); ?>" ONCLICK="location.href='/<?php p($ADMIN); ?>/languages/'">
    	</DIV>
	</TD>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_del.php

示例6: if

    <TR <?php  if ($color) { $color=0; ?>class="list_row_even"<?php  } else { $color=1; ?>class="list_row_odd"<?php  } ?>>
	<?php  if ($g_user->hasPermission("ManageCountries")) { ?>
	<TD <?php  if ($previousCountryCode == $country->getCode()) { ?>class="translation_indent"<?php } ?>>
		<A HREF="/<?php p($ADMIN); ?>/country/edit.php?f_country_code=<?php  p(urlencode($country->getCode())); ?>&f_country_language=<?php  p(urlencode($country->getLanguageId())); ?>"><?php p(htmlspecialchars($country->getName())); ?>&nbsp;</A>
	</TD>

	<?php  } else { ?>
	<TD <?php  if ($previousCountryCode == $country->getCode()) { ?>class="translation_indent"<?php } ?>>
		<?php  p(htmlspecialchars($country->getName())); ?>&nbsp;
	</TD>
	<?php  } ?>

	<TD>
	<?php
	$language = new Language($country->getLanguageId());
	p(htmlspecialchars($language->getNativeName()));
	?>
	</TD>

	<TD ALIGN="CENTER">
	<?php
		p(htmlspecialchars($country->getCode()));
	?>
    </TD>

    <?php  if ($g_user->hasPermission("ManageCountries")) { ?>
		<TD ALIGN="CENTER">
			<A HREF="/<?php p($ADMIN); ?>/country/translate.php?f_country_code=<?php p(urlencode($country->getCode())); ?>&f_country_language=<?php p($country->getLanguageId()); ?>"><?php  putGS("Translate"); ?></A>
		</TD>
	<?php  }
	if ($g_user->hasPermission("DeleteCountries")) { ?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:index.php

示例7: array

    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())));
    exit;
}
$articleObj = new Article($languageId, $articleNumber);
if (!$articleObj->exists()) {
    camp_html_display_error($translator->trans('Article does not exist.'));
    exit;
}
$translationLanguageObj = new Language($f_translation_language);
if (!$translationLanguageObj->exists()) {
    camp_html_display_error($translator->trans('Language does not exist.'));
    exit;
}
$translationArticle = new Article($f_translation_language, $articleNumber);
if ($translationArticle->exists()) {
    camp_html_add_msg($translator->trans("The article has already been translated into \$1.", array('$1' => $translationLanguageObj->getNativeName()), 'articles'));
    camp_html_goto_page($backLink);
}
$f_publication_id = $articleObj->getPublicationId();
// Only create the translated issue and section if the article has been categorized.
if ($f_publication_id > 0) {
    $publicationObj = new Publication($f_publication_id);
    if (!$publicationObj->exists()) {
        camp_html_display_error($translator->trans('Publication does not exist.'), $backLink);
        exit;
    }
    $f_issue_number = $articleObj->getIssueNumber();
    $issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
    if (!$issueObj->exists()) {
        camp_html_display_error($translator->trans('No such issue.'), $backLink);
        exit;
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_translate.php

示例8: putGS

            <fieldset class="name">
                <legend><?php  putGS("Change topic name"); ?></legend>
                <input type="text" class="input_text" name="f_name" value="<?php echo htmlspecialchars($topicName); ?>" size="32" maxlength="255"  title="<?php putGS('You must fill in the $1 field.',getGS('Name')); ?>" />
	            <input type="submit" class="button" name="Save" value="<?php  putGS('Save'); ?>" />
            </fieldset>
            </form>

            <form method="post" action="do_add.php" onsubmit="return validate(this);">
                <?php echo SecurityToken::FormParameter(); ?>
                <input type="hidden" name="f_topic_parent_id" value="<?php p($currentTopic->getTopicId()); ?>" />
                <input type="hidden" name="f_topic_language_id" value="<?php p($topicLanguageId); ?>" />
            

            <fieldset class="subtopic">
                <legend><?php putGS("Add subtopic:"); ?></legend>
                <label><?php p($topicLanguage->getNativeName()); ?></label>
                <input type="text" name="f_topic_name" value="" class="input_text" size="15" title="<?php putGS('You must enter a name for the topic.'); ?>" />
                <input type="submit" name="f_submit" value="<?php putGS("Add"); ?>" class="button" />
            </fieldset>
            </form>

            <?php if ($isFirstTranslation) {
                $isFirstTranslation = false;
            ?>
            <form method="post" action="do_add.php" onsubmit="return validate(this);">
                <?php echo SecurityToken::FormParameter(); ?>
                <input type="hidden" name="f_topic_id" value="<?php p($currentTopic->getTopicId()); ?>" />

            <fieldset class="translate">
                <legend><?php putGS("Add translation:"); ?></legend>
                <select name="f_topic_language_id" class="input_select" title="<?php putGS("You must select a language."); ?>">
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:index.php


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