本文整理汇总了PHP中getLanguageName函数的典型用法代码示例。如果您正苦于以下问题:PHP getLanguageName函数的具体用法?PHP getLanguageName怎么用?PHP getLanguageName使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLanguageName函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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';
}
}
示例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();
}
示例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";
}
}
示例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;
}
示例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 '';
}
示例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>';
}
示例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>
*/
}
示例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";
}
示例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;
}
示例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);
}
}
示例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>';
示例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;
示例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;
}
示例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;
}