本文整理汇总了PHP中getLanguageList函数的典型用法代码示例。如果您正苦于以下问题:PHP getLanguageList函数的具体用法?PHP getLanguageList怎么用?PHP getLanguageList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getLanguageList函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getMenuBarHTML
/**
* This file is a part of MyWebSQL package
*
* @file: lib/interface.php
* @author Samnan ur Rehman
* @copyright (c) 2008-2014 Samnan ur Rehman
* @web http://mywebsql.net
* @license http://mywebsql.net/license
*/
function getMenuBarHTML()
{
$themeMenu = '';
$langMenu = '';
$editorMenu = '';
$langList = array();
include BASE_PATH . "/config/themes.php";
foreach ($THEMES as $themeId => $theme) {
if (THEME_PATH == $themeId) {
$themeMenu .= '<li><a class="check" href="javascript:setPreference(\'theme\', \'' . $themeId . '\')">' . $theme . '</a></li>';
} else {
$themeMenu .= '<li><a href="javascript:setPreference(\'theme\', \'' . $themeId . '\')">' . $theme . '</a></li>';
}
}
$langList = getLanguageList();
foreach ($langList as $lang => $name) {
if (LANGUAGE == $lang) {
$langMenu .= '<li><a class="check" href="javascript:setPreference(\'lang\', \'' . $lang . '\')">' . $name . '</a></li>';
} else {
$langMenu .= '<li><a href="javascript:setPreference(\'lang\', \'' . $lang . '\')">' . $name . '</a></li>';
}
}
include BASE_PATH . "/config/editors.php";
foreach ($CODE_EDITORS as $editorId => $name) {
if (SQL_EDITORTYPE == $editorId) {
$editorMenu .= '<li><a class="check" href="javascript:setPreference(\'editor\', \'' . $editorId . '\')">' . $name . '</a></li>';
} else {
$editorMenu .= '<li><a href="javascript:setPreference(\'editor\', \'' . $editorId . '\')">' . $name . '</a></li>';
}
}
$replace = array('THEMES_MENU' => $themeMenu, 'LANGUAGE_MENU' => $langMenu, 'EDITOR_MENU' => $editorMenu);
return view('menubar', $replace);
}
示例2: aField
<p class="config-desc">
Preferably a short word without punctuation, i.e. "Wikipedia".<br />
Will appear as the namespace name for "meta" pages, and throughout the interface.
</p>
<div class="config-input"><?php
aField($conf, "EmergencyContact", "Contact e-mail:");
?>
</div>
<p class="config-desc">
Displayed to users in some error messages, used as the return address for password reminders, and used as the default sender address of e-mail notifications.
</p>
<div class="config-input">
<label class='column' for="LanguageCode">Language:</label>
<select id="LanguageCode" name="LanguageCode"><?php
$list = getLanguageList();
foreach ($list as $code => $name) {
$sel = $code == $conf->LanguageCode ? 'selected="selected"' : '';
$encCode = htmlspecialchars($code);
$encName = htmlspecialchars($name);
echo "\n\t\t<option value=\"{$encCode}\" {$sel}>{$encName}</option>";
}
echo "\n";
?>
</select>
</div>
<p class="config-desc">
Select the language for your wiki's interface. Some localizations aren't fully complete. Unicode (UTF-8) is used for all localizations.
</p>
<div class="config-input">
示例3: array
$array = array(0 => $LANG['disabled'], 1=>$LANG['enabled']);
$default = "delete";
$description = $LANG['delete'];
$value = dropDown($array, $defaults['delete']);
}
else if ($_GET['submit'] == "logging") {
$array = array(0 => $LANG['disabled'], 1=>$LANG['enabled']);
$default = "logging";
$description = $LANG['logging'];
$value = dropDown($array, $defaults[$default]);
}
else if($_GET['submit'] == "language") {
$default = "language";
$languages = getLanguageList($include_dir . 'sys/lang/');
$system_defaults = new SimpleInvoices_Db_Table_SystemDefaults();
$lang = $system_defaults->findByName('language');
usort($languages,"compareNameIndex");
$description = $LANG['language'];
//print_r($languages);
$value = "<select name='value'>";
foreach($languages as $language) {
$selected = "";
if($language->shortname == $lang) {
$selected = " selected ";
}
$value .= "<option $selected value='".htmlsafe($language->shortname)."'>".htmlsafe("$language->name ($language->englishname) ($language->shortname)")."</option>";
}
示例4: translate
echo '<fieldset>';
echo '<label>' . translate("INSTALL_ADMIN_PASS") . '</label>';
echo "<input type='password' id='admin_pass' name='admin_pass' value=''>";
echo '</fieldset>';
echo '<script>$(document).ready(function ($) { $("#admin_pass").strength({strengthButtonText: \' (Show password)\'}); });</script>';
echo '<fieldset>';
echo '<label>' . translate("INSTALL_ADMIN_BASEURL") . '</label>';
echo "<input type='text' class='input' name='base_url' size='30' value='http://" . $_SERVER['HTTP_HOST'] . "/'><br>(" . translate("EXAMPLE") . ": http://www.mydomain.com/";
echo '</fieldset>';
echo '<fieldset>';
echo '<label>' . translate("INSTALL_ADMIN_PATH_TO_PMNL") . '</label>';
echo "<input type='text' class='input' name='path' size='30' value='" . str_replace($_SERVER['DOCUMENT_ROOT'] . '/', "", __DIR__) . "/'><br>(" . translate("EXAMPLE") . " : tools/newsletter/)";
echo '</fieldset>';
echo '<fieldset>';
echo '<label>' . translate("INSTALL_LANGUAGE") . '</label>';
echo "<select NAME='language'>" . getLanguageList($langfile) . "</select>";
echo '</fieldset>';
echo '<fieldset>';
echo '<label>' . translate("INSTALL_ADMIN_NAME") . '</label>';
echo "<input type='text' class='input' name='admin_name' size='30' value='Admin'>";
echo '</fieldset>';
echo '<fieldset>';
echo '<label>' . translate("INSTALL_ADMIN_EMAIL") . '</label>';
echo "<input type='text' class='input' name='admin_email' size='30' value='admin@" . @str_replace("www.", "", $_SERVER['HTTP_HOST']) . "'>";
echo '</fieldset>';
echo '</div>';
echo '</article>';
echo '<article class="module width_full">';
echo '<header><h3>' . translate("INSTALL_MESSAGE_SENDING_TITLE") . '</h3></header>';
echo '<div class="module_content">';
echo '<fieldset>';
示例5: __
#results.pass { background: #191; }
#results.fail { background: #911; }
em { font-size: 12px; padding: 0 20px; }
</style>
</head>
<body>
<h1><a href="http://mywebsql.net" target="_blank"><img width="45" height="38" border="0" alt="MyWebSQL" class="logo" src="img/logo.png"></a>Environment Tests
<span>
<!--label><?php
echo __('Language');
?>
: </label><select name="lang" onchange="window.location.search='lang='+this.value">
<?php
$langList = getLanguageList();
$selLang = LANGUAGE;
foreach ($langList as $lang => $name) {
if ($selLang == $lang) {
echo '<option value="' . $lang . '" selected="selected">' . $name . '</option>';
} else {
echo '<option value="' . $lang . '">' . $name . '</option>';
}
}
?>
</select-->
</span>
</h1>
<p>
The following tests have been run to determine if <a href="http://mywebsql.net">MyWebSQL</a> will work in your environment.<br />
示例6: getLanguageList
?>
</div>
<?php
} else {
?>
<p><?php
echo $Language->get('Choose your language');
?>
</p>
<form class="uk-form" method="get" action="" autocomplete="off">
<div class="uk-form-row">
<select id="jslanguage" name="language" class="uk-width-1-1">
<?php
$htmlOptions = getLanguageList();
foreach ($htmlOptions as $locale => $nativeName) {
echo '<option value="' . $locale . '"' . ($localeFromHTTP === $locale ? ' selected="selected"' : '') . '>' . $nativeName . '</option>';
}
?>
</select>
</div>
<div class="uk-form-row">
<button type="submit" class="uk-width-1-1 uk-button uk-button-primary uk-button-large"><?php
$Language->p('Next');
?>
</button>
</div>
</form>
示例7: checkLogin
<?php
//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
//gets the long language name out of the short name
$lang = getDefaultLanguage();
$languages = getLanguageList();
foreach ($languages as $language) {
if ($language->shortname == $lang) {
$lang = $language->name;
break;
}
}
$smarty->assign("defaults", getSystemDefaults());
$smarty->assign("defaultBiller", getDefaultBiller());
$smarty->assign("defaultCustomer", getDefaultCustomer());
$smarty->assign("defaultTax", getDefaultTax());
$smarty->assign("defaultPreference", getDefaultPreference());
$smarty->assign("defaultPaymentType", getDefaultPaymentType());
$smarty->assign("defaultDelete", getDefaultDelete());
$smarty->assign("defaultLogging", getDefaultLogging());
$smarty->assign("defaultInventory", getDefaultInventory());
$smarty->assign("defaultLanguage", $lang);
$smarty->assign('pageActive', 'system_default');
$smarty->assign('active_tab', '#setting');
示例8: setcookie
<?php
/*
Language Handler System via Cookie.
*/
include_once 'lang/langList.php';
if (isset($_GET['lang'])) {
$lingua = $_GET['lang'];
// register the session and set the cookie
$_SESSION['lingua'] = $lingua;
setcookie("lingua", $lingua, time() + 3600 * 24 * 30);
} else {
if (isset($_SESSION['lingua'])) {
$lingua = $_SESSION['lingua'];
} else {
if (isset($_COOKIE['lingua'])) {
$lingua = $_COOKIE['lingua'];
} else {
$lingua = 'en';
}
}
}
if (in_array($lingua, getLanguageList())) {
include_once 'lang/lang.' . $lingua . '.php';
} else {
include_once 'lang/lang.en.php';
}
$lang = new language();
示例9: userManSettings
//.........这里部分代码省略.........
$retArray = readDirInfo($include_path . "style", "dir");
sort($retArray);
for ($i = 0; $i < count($retArray); $i++) {
if ($retArray[$i] == "images") {
continue;
}
echo '<option ';
if ($settings['theme'] == $retArray[$i]) {
echo 'selected ';
}
echo 'value="' . $retArray[$i] . '">' . $retArray[$i] . '</option>' . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td width="30%" valign="top" align="right">
<?php
echo word("Language");
?>
:
</td>
<td width="70%">
<?php
$overCode = $display->returnToolTip(word("LANGUAGE_NOTE"), word("Default Language"));
?>
<select <?php
echo $overCode;
?>
name="usr_language" class="jz_select" style="width:135px;">
<?php
// Let's get all the interfaces
$languages = getLanguageList();
for ($i = 0; $i < count($languages); $i++) {
echo '<option ';
if ($languages[$i] == $settings['language']) {
echo ' selected ';
}
echo 'value="' . $languages[$i] . '">' . $languages[$i] . '</option>' . "\n";
}
?>
</select>
</td>
</tr>
<tr>
<td width="30%" valign="top" align="right">
<?php
echo word("Home Directory");
?>
:
</td>
<td width="70%">
<?php
$overCode = $display->returnToolTip(word("HOMEDIR_NOTE"), word("User Home Directory"));
?>
<input <?php
echo $overCode;
?>
type="input" name="home_dir" class="jz_input" value="<?php
echo $settings['home_dir'];
?>
">
</td>
</tr>
<tr>
示例10: session_start
<?php
session_start();
include 'lang_handler.php';
?>
Language:
<select onchange="location = 'index.php?lang='+this.options[this.selectedIndex].value;">
<option>Select your language</option>
<?php
foreach (getLanguageList() as $key => $value) {
echo "<option value=" . $value . ">";
echo isset($allLangList[$value]) ? $allLangList[$value] : $value;
echo "</option>";
}
?>
</select>
<br/>
<br/>
<h3 align="center">
<?php
echo $lang->hello;
?>
</h3>
<table align="center" width="99%" border="0" cellspacing="20">
<tr align="center">
<td width="33%"><a href="http://picasaweb.google.com/heldersepu">
<?php
echo $lang->photo_album;
示例11: array
break;
case "playlist":
$display->settingsDropdown("enable_playlist", "enable_playlist", array("true", "false"), $settings_array);
$display->settingsTextbox("playlist_ext", "playlist_ext", $settings_array);
$display->settingsDropdown("use_ext_playlists", "use_ext_playlists", array("true", "false"), $settings_array);
$display->settingsTextbox("max_playlist_length", "max_playlist_length", $settings_array);
$display->settingsTextbox("random_play_amounts", "random_play_amounts", $settings_array);
$display->settingsTextbox("default_random_count", "default_random_count", $settings_array);
$display->settingsTextbox("default_random_type", "default_random_type", $settings_array);
$display->settingsTextbox("embedded_player", "embedded_player", $settings_array);
break;
case "display":
$display->settingsTextbox("site_title", "site_title", $settings_array);
$display->settingsDropdownDirectory("jinzora_skin", "jinzora_skin", $include_path . 'style', "dir", $settings_array);
$display->settingsDropdownDirectory("frontend", "frontend", $include_path . 'frontend/frontends', "dir", $settings_array);
$display->settingsDropdown("jz_lang_file", "jz_lang_file", getLanguageList(), $settings_array);
$display->settingsDropdown("allow_lang_choice", "allow_lang_choice", array("true", "false"), $settings_array);
$display->settingsDropdown("allow_style_choice", "allow_style_choice", array("true", "false"), $settings_array);
$display->settingsDropdown("allow_interface_choice", "allow_interface_choice", array("true", "false"), $settings_array);
$display->settingsDropdown("use_ext_playlists", "use_ext_playlists", array("true", "false"), $settings_array);
$display->settingsDropdown("show_page_load_time", "show_page_load_time", array("true", "false"), $settings_array);
$display->settingsDropdown("show_sub_numbers", "show_sub_numbers", array("true", "false"), $settings_array);
$display->settingsTextbox("quick_list_truncate", "quick_list_truncate", $settings_array);
$display->settingsTextbox("album_name_truncate", "album_name_truncate", $settings_array);
$display->settingsDropdown("sort_by_year", "sort_by_year", array("true", "false"), $settings_array);
$display->settingsTextbox("num_other_albums", "num_other_albums", $settings_array);
$display->settingsDropdown("header_drops", "header_drops", array("true", "false"), $settings_array);
$display->settingsDropdown("genre_drop", "genre_drop", array("true", "false", "popup"), $settings_array);
$display->settingsDropdown("artist_drop", "artist_drop", array("true", "false", "popup"), $settings_array);
$display->settingsDropdown("album_drop", "album_drop", array("true", "false", "popup"), $settings_array);
$display->settingsDropdown("song_drop", "song_drop", array("true", "false", "popup"), $settings_array);
示例12: translate
echo "checked='checked'";
}
echo " > " . translate("NO");
echo "<input type='radio' name='unsub_validation' value='1' ";
if ($row_config_globale['unsub_validation']) {
echo "checked='checked'";
}
echo " > " . translate("YES") . "</fieldset>";
echo '</div></div>
<div id="tab6" class="tab_content" style="display: none;">';
echo "<div class='module_content'>";
echo "<h2>" . translate("GCONFIG_MISC_TITLE") . "</h2>";
echo "<fieldset><label>" . translate("GCONFIG_MISC_ADMIN_PASSW") . " " . translate("GCONFIG_MISC_ADMIN_PASSW2") . "</label>\n\t\t\t\t<input type='password' name='admin_pass' value='' autocomplete='off' /></fieldset>";
echo "<fieldset><label>" . translate("GCONFIG_MISC_BASE_URL") . "</label>\n\t\t\t\t<input type='text' name='base_url' value='" . $row_config_globale['base_url'] . "' /></fieldset>";
echo "<fieldset><label>" . translate("GCONFIG_MISC_BASE_PATH") . "</label>\n\t\t\t\t<input type='text' name='path' value='" . $row_config_globale['path'] . "' /></fieldset>";
echo "<fieldset><label>" . translate("GCONFIG_MISC_LANGUAGE") . "</label>\n\t\t\t\t<select name='language'>" . getLanguageList($row_config_globale['language']) . "</select></fieldset>";
echo "</div>";
echo '</div>
</div>
</article>';
echo '<article class="module width_quarter "><div class="sticky-scroll-box">';
echo '<header><h3>Actions :</h3></header><div align="center">';
echo "<input type='hidden' name='op' value='saveGlobalconfig'><br />";
echo "<input type='hidden' name='mod_sub' value='0'><input type='hidden' name='token' value='{$token}' /><br />";
echo "<input type='submit' value='" . translate("GCONFIG_SAVE_BTN") . "' class='button'></center>";
echo "<br> ";
echo '</div></article>';
echo "</form>";
?>
示例13: languageDropdown
/**
* The dropdown for the language selector.
*
* @author Ben Dodson
* @since 3/17/05
* @version 3/17/05
*
**/
function languageDropdown()
{
global $web_root, $root_dir, $this_page;
?>
<form action="<?php
echo $_SERVER['PHP_SELF'];
?>
" method="GET" name="language">
<?php
$this->hiddenVariableField("jz_path");
$this->hiddenPageVars();
// Now let's get all the possibles
$languages = getLanguageList();
?>
<select class="jz_select" name="<?php
echo jz_encode("set_language");
?>
" style="width:125px" onChange="submit()">
<option value="">Language</option>
<?php
foreach ($languages as $language) {
echo '<option value="' . jz_encode(str_replace(".php", "", $language)) . '">' . str_replace(".php", "", $language) . '</option>' . "\n";
}
?>
</select>
</form>
<?php
}