本文整理汇总了PHP中WT_I18N::languageName方法的典型用法代码示例。如果您正苦于以下问题:PHP WT_I18N::languageName方法的具体用法?PHP WT_I18N::languageName怎么用?PHP WT_I18N::languageName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WT_I18N
的用法示例。
在下文中一共展示了WT_I18N::languageName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// the Free Software Foundation; either version 2 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
if (!defined('WT_WEBTREES')) {
header('HTTP/1.0 403 Forbidden');
exit;
}
$specialchar_languages = array("af" => WT_I18N::languageName('af'), "ar" => WT_I18N::languageName('ar'), "cs" => WT_I18N::languageName('cs'), "da" => WT_I18N::languageName('da'), "de" => WT_I18N::languageName('de'), "el" => WT_I18N::languageName('el'), "en" => WT_I18N::languageName('en'), "es" => WT_I18N::languageName('es'), "eu" => WT_I18N::languageName('eu'), "fi" => WT_I18N::languageName('fi'), "fr" => WT_I18N::languageName('fr'), "gd" => WT_I18N::languageName('gd'), "haw" => WT_I18N::languageName('haw'), "he" => WT_I18N::languageName('he'), "hu" => WT_I18N::languageName('hu'), "is" => WT_I18N::languageName('is'), "it" => WT_I18N::languageName('it'), "lt" => WT_I18N::languageName('lt'), "nl" => WT_I18N::languageName('nl'), "nn" => WT_I18N::languageName('nn'), "pl" => WT_I18N::languageName('pl'), "pt" => WT_I18N::languageName('pt'), "ru" => WT_I18N::languageName('ru'), "sk" => WT_I18N::languageName('sk'), "sl" => WT_I18N::languageName('sl'), "sv" => WT_I18N::languageName('sv'), "tr" => WT_I18N::languageName('tr'), "vi" => WT_I18N::languageName('vi'));
switch ($language_filter) {
case "af":
// Afrikaans
$ucspecialchars = array("È" => "È", "É" => "É", "Ê" => "Ê", "Ë" => "Ë", "Î" => "Î", "Ï" => "Ï", "Ô" => "Ô", "Û" => "Û");
$lcspecialchars = array("è" => "è", "é" => "é", "ê" => "ê", "ë" => "ë", "î" => "î", "ï" => "ï", "ô" => "ô", "û" => "û", "ʼn" => "ʼn");
break;
case "cs":
// Ceština
$ucspecialchars = array("Á" => "Á", "Ą" => "Ą", "Ä" => "Ä", "É" => "É", "Ę" => "Ę", "Ě" => "Ě", "Í" => "Í", "Ó" => "Ó", "Ô" => "Ô", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "Č" => "Č", "Ĺ" => "Ĺ", "Ň" => "Ň", "Ŕ" => "Ŕ", "Ř" => "Ř", "Š" => "Š", "Ž" => "Ž");
$lcspecialchars = array("á" => "á", "ą" => "ą", "ä" => "ä", "é" => "é", "ę" => "ę", "ě" => "ě", "í" => "í", "ó" => "ó", "ô" => "ô", "ú" => "ú", "ů" => "ů", "ý" => "ý", "č" => "č", "ď" => "ď", "ť" => "ť", "ĺ" => "ĺ", "ň" => "ň", "ŕ" => "ŕ", "ř" => "ř", "š" => "š", "ž" => "ž");
break;
case "sk":
// Slovenčina
$ucspecialchars = array("Á" => "Á", "Ä" => "Ä", "Č" => "Č", "Ď" => "Ď", "É" => "É", "Ě" => "Ě", "Í" => "Í", "Ĺ" => "Ĺ", "Ľ" => "Ľ", "Ň" => "Ň", "Ó" => "Ó", "Ô" => "Ô", "Ŕ" => "Ŕ", "Ř" => "Ř", "Š" => "Š", "Ť" => "Ť", "Ú" => "Ú", "Ů" => "Ů", "Ý" => "Ý", "Ž" => "Ž");
$lcspecialchars = array("á" => "á", "ä" => "ä", "č" => "č", "ď" => "ď", "é" => "é", "ě" => "ě", "í" => "í", "ĺ" => "ĺ", "ľ" => "ľ", "ň" => "ň", "ó" => "ó", "ô" => "ô", "ŕ" => "ŕ", "ř" => "ř", "š" => "š", "ť" => "ť", "ú" => "ú", "ů" => "ů", "ý" => "ý", "ž" => "ž");
示例2: foreach
echo $unapproved;
?>
</td>
</tr>
<tr>
<td colspan="2"><?php
echo WT_I18N::translate('Users’ languages');
?>
</td>
</tr>
<?php
foreach ($user_languages as $language => $n) {
?>
<tr>
<td> <?php
echo WT_I18N::languageName($language);
?>
</td>
<td><?php
echo $n;
?>
</td>
</tr>
<?php
}
?>
<tr>
<td colspan="2"><?php
echo WT_I18N::translate('Users logged in');
?>
</td>