本文整理汇总了PHP中getLanguageName函数的典型用法代码示例。如果您正苦于以下问题:PHP getLanguageName函数的具体用法?PHP getLanguageName怎么用?PHP getLanguageName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLanguageName函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: init
public function init()
{
$language = preg_replace('#\\\\|/#', '', getLanguageName());
if (file_exists($this->getDirectory() . $language . '.php')) {
include_once $this->getDirectory() . $language . '.php';
} else {
include_once $this->getDirectory() . 'english.php';
}
return;
}
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:10,代码来源:NP_Ping.php
示例2: init
function init()
{
// include language file for this plugin
$language = str_replace(array('\\', '/'), '', getLanguageName());
if (file_exists($this->getDirectory() . $language . '.php')) {
include_once $this->getDirectory() . $language . '.php';
} else {
include_once $this->getDirectory() . 'english.php';
}
}
开发者ID:NucleusCMS,项目名称:NP_AccessControl,代码行数:10,代码来源:NP_AccessControl.php
示例3: init
public function init()
{
// include language file for this plugin
$language = str_replace(array('\\', '/'), '', getLanguageName());
$includeDir = $this->getDirectory() . 'language/';
$includeFile = is_file($includeDir . $language . '.inc') ? $language : 'english';
include_once $includeDir . $includeFile . '.inc';
$this->language = $includeFile;
// Mobile Detect
require_once $this->getDirectory() . "Mobile-Detect-{$this->mobileDetectVersion}/Mobile_Detect.php";
$this->detect = new Mobile_Detect();
}
开发者ID:NucleusCMS,项目名称:NP_MobileDetect,代码行数:12,代码来源:NP_MobileDetect.php
示例4: init
function init()
{
// include language file for this plugin
global $CONF;
$adminurl = parse_url($CONF['AdminURL']);
$currenturl = getenv('SCRIPT_NAME');
if (strpos($currenturl, $adminurl['path']) !== 0) {
return;
}
$language = str_replace(array('\\', '/'), '', getLanguageName());
$langDir = $this->getDirectory() . 'language/';
if (!@(include_once "{$langDir}{$language}.php")) {
include_once "{$langDir}english.php";
}
}
开发者ID:NucleusCMS,项目名称:NP_TinyMCE,代码行数:15,代码来源:NP_TinyMCE.php
示例5: init
public function init()
{
$language = preg_replace('#\\\\|/#', '', getLanguageName());
if (file_exists($this->getDirectory() . $language . '.php')) {
include_once $this->getDirectory() . $language . '.php';
} else {
include_once $this->getDirectory() . 'english.php';
}
$this->enable_security = $this->getOption('enable_security');
$this->pwd_min_length = intval($this->getOption('pwd_min_length'));
$this->pwd_complexity = intval($this->getOption('pwd_complexity'));
$this->max_failed_login = intval($this->getOption('max_failed_login'));
$this->login_lockout = intval($this->getOption('login_lockout'));
return;
}
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:15,代码来源:NP_SecurityEnforcer.php
示例6: getInlinejs
private function getInlinejs()
{
static $called = FALSE;
if ($called) {
return;
}
// Use only once
$called = TRUE;
global $DIR_MEDIA, $CONF;
$adminurl = $this->getAdminURL();
$tpl = file_get_contents($this->getDirectory() . 'inlinejs.tpl');
if ($tpl !== FALSE) {
$ph['adminurl'] = $adminurl;
$ph['lang'] = getLanguageName() === 'japanese-utf8' ? 'ja' : 'en';
$ph['MediaURL'] = $CONF['MediaURL'];
return $this->parseText($tpl, $ph);
}
return '';
}
开发者ID:NucleusCMS,项目名称:NP_CKEditor,代码行数:19,代码来源:NP_CKEditor.php
示例7: articleMetaInfo
function articleMetaInfo($author, $author_username, $date, $time = "", $languageId = "")
{
debug("LanguageId er " . $languageId);
$languageName = getLanguageName($languageId);
echo '<div class="metatext">';
echo '<span class="author">';
if ($author_username == -1) {
echo stripslashes($author);
} else {
echo '<a href="index.php?m_c=mvp&username=';
echo $author_username . '">' . stripslashes($author) . '</a>';
}
echo '</span>';
if (strlen($time) > 1) {
echo ', postet <span class="date">' . $date . '</span>';
echo '<span class="time"> ' . $time . '</span>';
} else {
echo ', <span class="date">' . $date . '</span>';
}
if (strlen($languageName) > 0) {
echo ' <span class="date">(' . $languageName . ')</span>';
}
echo '</div>';
}
开发者ID:arewold,项目名称:calcuttagutta,代码行数:24,代码来源:html.php
示例8: install
function install()
{
// include language file for this plugin
$language = str_replace(array('\\', '/'), '', getLanguageName());
if (file_exists($this->getDirectory() . $language . '.php')) {
include_once $this->getDirectory() . $language . '.php';
} else {
include_once $this->getDirectory() . 'english.php';
}
$this->createOption('timelocale', _NP_LRWITEBACKS_TZLOC, 'text', 'ja_JP.' . _CHARSET);
$this->createOption('cmdateformat', _NP_LRWITEBACKS_CDFMT, 'text', '%Y-%m-%d %H:%M:%S');
$this->createOption('tbdateformat', _NP_LRWITEBACKS_TEFMT, 'text', '%m-%d');
$this->createOption('cmlisthead', _NP_LRWITEBACKS_CHEAD, 'textarea', '<ul class="nobullets">');
$this->createOption('cmttemplate', _NP_LRWITEBACKS_CBODY, 'textarea', '<li>♣<a href="<%itemlink%>#c<%commentid%>"><%commentdate%>|<%commentator%>><%commentbody%></a></li>');
$this->createOption('cmlistfoot', _NP_LRWITEBACKS_CFOOT, 'textarea', '</ul>');
$this->createOption('tblisthead', _NP_LRWITEBACKS_THEAD, 'textarea', '<ul class="nobullets">');
$this->createOption('tbktemplate', _NP_LRWITEBACKS_TBODY, 'textarea', '<li>…<a href="<%itemlink%>#trackback"><%tbdate%>|<%blogname%> ping: "<%entrytitle%>"</a></li>');
$this->createOption('tblistfoot', _NP_LRWITEBACKS_TFOOT, 'textarea', '</ul>');
/*
Comment list template sample
Header
<ol class="recent-comment">
Body
<li><a href="<%itemlink%>#c<%commentid%>" title="<%commentbody%>"><%commentator%>(<%commentday%>)</a></li>
Footer
</ol>
TrackBack list template sample
Header
<ol class="recent-trackback">
Body
<li><a href="<%itemlink%>#tb<%tbid%>" title="<%expect%>"><%blogname%> : <%entrytitle%>(<%tbday%>)</a></li>
Footer
</ol>
*/
}
开发者ID:NucleusCMS,项目名称:NP_LatestWritebacks,代码行数:36,代码来源:NP_LatestWritebacks.php
示例9: init
function init()
{
global $admin;
$language = str_replace(array('\\', '/'), '', getLanguageName());
$plugin_path = $this->getDirectory();
if (!is_file("{$plugin_path}language/{$language}.php")) {
$language = 'english';
}
include_once "{$plugin_path}language/{$language}.php";
}
开发者ID:utsurop,项目名称:NP_CustomURL,代码行数:10,代码来源:NP_CustomURL.php
示例10: init
public function init()
{
global $manager;
$locale = '';
if (!class_exists('Medium', FALSE)) {
$manager->getPlugin('NP_Thumbnail');
}
/* new API */
if (class_exists('i18n', FALSE)) {
$locale = i18n::get_current_locale() . '.' . i18n::get_current_charset() . '.php';
} else {
$language = preg_replace('#[/|\\\\]#', '', getLanguageName());
if ($language == 'japanese-euc') {
$locale = 'ja_Jpan_JP.EUC-JP.php';
} else {
if ($language = 'japanese-utf8') {
$locale = 'ja_Jpan_JP.UTF-8.php';
}
}
}
if (!$locale || !file_exists($this->getDirectory() . $locale)) {
include $this->getDirectory() . 'en_Latn_US.ISO-8859-1.php';
} else {
include $this->getDirectory() . $locale;
}
return;
}
开发者ID:NucleusCMS,项目名称:NP_Thumbnail,代码行数:27,代码来源:NP_Thumbnail.php
示例11: init
function init()
{
// include language file for this plugin
$language = str_replace(array('\\', '/'), '', getLanguageName());
if (file_exists($this->getDirectory() . $language . '.php')) {
include_once $this->getDirectory() . $language . '.php';
} else {
include_once $this->getDirectory() . 'english.php';
}
//sortkey array (called from admin area)
$this->arr_skey = array();
foreach (range('a', 'z') as $key) {
$this->arr_skey[$key] = strtoupper($key);
}
}
开发者ID:NucleusCMS,项目名称:NP_LinkList,代码行数:15,代码来源:NP_LinkList.php
示例12: include_libs
* 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.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit
* http://www.gnu.org/licenses/gpl.html
* ==========================================================================================
*/
$DIR_LIBS = '';
$strRel = '../../../';
require $strRel . 'config.php';
include_libs('PLUGINADMIN.php');
$language = preg_replace('#\\\\|/#', '', getLanguageName());
$langfile = $language . '.php';
if (file_exists($langfile)) {
include_once $langfile;
} else {
include_once 'english.php';
}
/**
* Create admin area
*/
$oPluginAdmin = new PluginAdmin('SkinFiles');
if (!($member->isLoggedIn() && $member->isAdmin())) {
/* begin modification by yama.kyms */
$oPluginAdmin->start();
/* end modification */
echo '<p>' . _ERROR_DISALLOWED . '</p>';
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:31,代码来源:index.php
示例13: yu
yu (http://nucleus.datoka.jp/)
index.php (admin page)
----------------------
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 2
of the License, or (at your option) any later version.
(see nucleus/documentation/index.html#license for more info)
*/
$strRel = '../../../';
include $strRel . 'config.php';
include $DIR_LIBS . 'PLUGINADMIN.php';
include 'functions.php';
$language = ereg_replace('[\\|/]', '', getLanguageName());
$langfile = $language . '.php';
if (file_exists($langfile)) {
include_once $langfile;
} else {
include_once 'english.php';
}
/**
* Create admin area
*/
$oPluginAdmin = new PluginAdmin('LinkList');
$pluginUrl = $oPluginAdmin->plugin->getAdminURL();
switch ($oPluginAdmin->plugin->getOption('sel_edit')) {
case 'siteadmin':
$flg_edit = $member->isAdmin();
break;
开发者ID:NucleusCMS,项目名称:NP_LinkList,代码行数:31,代码来源:index.php
示例14: availableLocales
function availableLocales($active_locale = null, $bypass_settings = false)
{
// Initialize
$scan = scandir(JAPPIX_BASE . '/i18n/');
$list = array();
// Loop the available languages
foreach ($scan as $current_id) {
// Pass?
if (!$bypass_settings && LANGUAGE && LANGUAGE != 'all' && $current_id != LANGUAGE) {
continue;
}
// Get the current language name
$current_name = getLanguageName($current_id);
// Not valid?
if (strtolower($current_id) == $active_locale || $current_name == null) {
continue;
}
// Add this to the list
$list[$current_id] = $current_name;
}
return $list;
}
开发者ID:neurolit,项目名称:jappix,代码行数:22,代码来源:functions.php
示例15: availableLocales
function availableLocales($active_locale)
{
// Initialize
$scan = scandir(JAPPIX_BASE . '/lang/');
$list = array();
// Loop the available languages
foreach ($scan as $current_id) {
// Get the current language name
$current_name = getLanguageName($current_id);
// Not valid?
if (strtolower($current_id) == $active_locale || $current_name == null) {
continue;
}
// Add this to the list
$list[$current_id] = $current_name;
}
return $list;
}
开发者ID:ntrrgc,项目名称:jappix,代码行数:18,代码来源:functions.php
示例16: _e
<li><?php
_e("Main configuration");
?>
</li>
<li><?php
_e("Hosts configuration");
?>
</li>
<li><?php
_e("Services installation");
?>
</li>
</ol>
<p><?php
printf(T_("If the current language does not match yours (%1s), you can make Jappix speak %2s it will be saved."), getLanguageName($locale), languageSwitcher($locale));
?>
</p>
<p><?php
_e("If you want to get some help about the Jappix installation and configuration, you can use our whole documentation, available at:");
?>
<a href="https://github.com/jappix/jappix/wiki" target="_blank">https://github.com/jappix/jappix/wiki</a></p>
<p><?php
_e("It's time to build your own social cloud: just go to the next step!");
?>
</p>
<?php
} else {
if ($step == 2) {
开发者ID:neurolit,项目名称:jappix,代码行数:31,代码来源:install.php
示例17: doTemplateVar
public function doTemplateVar(&$item, $constant)
{
global $member, $CONF;
$language = getLanguageName();
$getLanguage = isset($_GET['lang']) ? getVar('lang') : false;
$cookieLanguage = isset($_COOKIE['NP_Text']) ? cookieVar('NP_Text') : false;
if ($getLanguage) {
$this->use_lang($getLanguage, $constant);
} elseif ($cookieLanguage) {
$this->use_lang($cookieLanguage, $constant);
} else {
$this->use_lang($language, $constant);
}
}
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:14,代码来源:NP_Text.php
示例18: installer_t
<div class="row"><label for="app"><?php
echo installer_t('Application Name');
?>
</label><input type="text" name="app" id="app" value="<?php
getField('app', 'X2Engine');
?>
" style="width:190px" /></div>
<div class="row"><label for="language"><?php
echo installer_t('Default Language');
?>
</label>
<select name="language" id="language" onChange="changeLang(this.options[this.selectedIndex].value);" style="width:200px"><option value="">English</option>
<?php
foreach ($languageDirs as $code) {
// generate language dropdown
$languageName = getLanguageName($code);
// lookup language name
if ($languageName !== false) {
$selected = $code == $lang ? ' selected' : '';
// mark option selected if user has chosen this language
echo "\t\t<option value=\"{$code}\"{$selected}>{$languageName}</option>\n";
// list all available languages
}
}
echo '</select>';
?>
</div>
<div class="row"><label for="currency"><?php
echo installer_t('Currency');
?>
开发者ID:shayanyi,项目名称:CRM,代码行数:31,代码来源:install.php
示例19: _e
<span class="desc"><?php
_e("Find a public Jappix node.");
?>
</span>
</a>
</div>
</div>
</div>
<div class="locale" data-keepget="<?php
echo keepGet('l', false);
?>
">
<div class="current">
<div class="current_align"><?php
echo getLanguageName($locale);
?>
</div>
</div>
</div>
<?php
// Add the notice
$conf_notice = readNotice();
$type_notice = $conf_notice['type'];
$text_notice = $conf_notice['notice'];
// Simple notice
if ($type_notice == 'simple' || $type_notice == 'advanced') {
// We must encode special HTML characters
if ($type_notice == 'simple') {
$text_notice = '<span class="title home-images">' . T_("Notice") . '</span><span class="text">' . htmlentities($text_notice) . '</span>';
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:31,代码来源:desktop.php
示例20: defineMultilanguage
/**
* Multi language support
*/
function defineMultilanguage()
{
$multilang = array('_NPTAGEX_ERASE_FLG' => array('Erase data when uninstall ?', 'アンインストール時にデータを消去しますか?'), '_NPTAGEX_EDT_TAGORDER' => array('editform tag order', 'アイテム追加/編集時のタグの並び順'), '_NPTAGEX_ORDER_VALUE' => array("amount(desc)|1|amount(asc)|2|tag's order|3|random|4", 'アイテムの多い順|1|アイテムの少ない順|2|タグ順(キャラクターコード順)|3|ランダム|4'), '_NPTAGEX_TPL_AND' => array("template for 'and'", "'and' リンクのテンプレート"), '_NPTAGEX_TPL_OR' => array("template for 'or'", "'or' リンクのテンプレート"), '_NPTAGEX_TPL_TAGIDX' => array("template for 'tagIndex'", 'タグのリンクのテンプレート'), '_NPTAGEX_TPL_ITEMHEAD' => array("template for 'tagItemHeader'", 'タグを含むアイテムごとのヘッダ'), '_NPTAGEX_TPL_TAGITEMS' => array("template for 'tagItem'", 'タグを含むアイテム'), '_NPTAGEX_TPL_ITEMSEPL' => array("template for 'tagItemSeparator'", 'タグを含むアイテムのセパレータ'), '_NPTAGEX_TPL_ITEMFOOT' => array("template for 'tagItemFooter'", 'タグを含むアイテムごとのフッタ'), '_NPTAGEX_TPL_IDXSEP' => array("template for 'tagIndexSeparator'", 'タグのリンクのセパレータ'), '_NPTAGEX_ONLY_CURRENT' => array('show tags only current blog have', '表示中のブログのアイテムに登録してあるタグのみ表示'), '_NPTAGEX_HILIGHT_MODE' => array('colorful highlight mode ?', 'カラフルハイライトモードにしますか?'), '_NPTAGEX_HILIGHT_NORM' => array('template for normal highlightmode', 'ノーマルハイライトモードの時のテンプレート'), '_NPTAGEX_MAX_TAGLEBEL' => array('MAX tag lebel', 'タグレベルの最大値'), '_NPTAGEX_MIN_TAGLEBEL' => array('MAX tag lebel', 'タグレベルの最小値'));
switch (str_replace(array('\\', '/'), '', getLanguageName())) {
case 'japanese-utf8':
foreach ($multilang as $key => $value) {
define($key, $value[1]);
}
break;
case 'japanese-euc':
foreach ($multilang as $key => $value) {
define($key, mb_convert_encoding($value[1], 'EUC-JP', 'UTF-8'));
}
break;
default:
foreach ($multilang as $key => $value) {
define($key, $value[0]);
}
}
}
开发者ID:NucleusCMS,项目名称:NP_TagEX,代码行数:23,代码来源:NP_TagEX.php
注:本文中的getLanguageName函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论