*REVERTED* correct lang definition

This commit is contained in:
Sebastian Mendel
2005-11-23 15:10:19 +00:00
parent 8996ff60a1
commit 37dec301be
2 changed files with 34 additions and 21 deletions

View File

@@ -6,7 +6,7 @@ $Id$
$Source$ $Source$
2005-11-23 Sebastian Mendel <cybot_tm@users.sourceforge.net> 2005-11-23 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* libraries/display_select_lang.lib.php: correct lang definition * *REVERTED* libraries/display_select_lang.lib.php: correct lang definition
* themes/original/*, libraries/auth/*.auth.lib.php, server_privilegs.php, * themes/original/*, libraries/auth/*.auth.lib.php, server_privilegs.php,
db_printview.php, tbl_properties_structure.php, tbl_properties.inc.php, db_printview.php, tbl_properties_structure.php, tbl_properties.inc.php,
tbl_relation.php, browse_foreigners.php, css/phpmyadmin.css.php, tbl_relation.php, browse_foreigners.php, css/phpmyadmin.css.php,

View File

@@ -23,33 +23,41 @@ function PMA_language_cmp( &$a, &$b ) {
*/ */
function PMA_select_language($use_fieldset = FALSE) { function PMA_select_language($use_fieldset = FALSE) {
global $cfg, $lang; global $cfg, $lang;
?> ?>
<form method="post" action="index.php" target="_parent"> <form method="post" action="index.php" target="_parent">
<bdo xml:lang="en" dir="ltr"> <bdo xml:lang="en" dir="ltr">
<?php <?php
if (isset($GLOBALS['collation_connection'])) { if (isset($GLOBALS['collation_connection'])) {
echo ' <input type="hidden" name="collation_connection" value="' . htmlspecialchars($GLOBALS['collation_connection']) . '" />' . "\n"; echo ' <input type="hidden" name="collation_connection" value="'
. htmlspecialchars($GLOBALS['collation_connection']) . '" />' . "\n";
} }
if (isset($GLOBALS['convcharset'])) { if (isset($GLOBALS['convcharset'])) {
echo ' <input type="hidden" name="convcharset" value="' . htmlspecialchars($GLOBALS['convcharset']) . '" />' . "\n"; echo ' <input type="hidden" name="convcharset" value="'
. htmlspecialchars($GLOBALS['convcharset']) . '" />' . "\n";
} }
if (isset($GLOBALS['db'])) { if (isset($GLOBALS['db'])) {
echo ' <input type="hidden" name="db" value="' . htmlspecialchars($GLOBALS['db']) . '" />' . "\n"; echo ' <input type="hidden" name="db" value="'
. htmlspecialchars($GLOBALS['db']) . '" />' . "\n";
} }
if (isset($GLOBALS['table'])) { if (isset($GLOBALS['table'])) {
echo ' <input type="hidden" name="table" value="' . htmlspecialchars($GLOBALS['table']) . '" />' . "\n"; echo ' <input type="hidden" name="table" value="'
. htmlspecialchars($GLOBALS['table']) . '" />' . "\n";
} }
if (isset($GLOBALS['server'])) { if (isset($GLOBALS['server'])) {
echo ' <input type="hidden" name="server" value="' . ((int)$GLOBALS['server']) . '" />' . "\n"; echo ' <input type="hidden" name="server" value="'
. ((int)$GLOBALS['server']) . '" />' . "\n";
} }
if ($use_fieldset) { if ($use_fieldset) {
echo '<fieldset>'; echo '<fieldset>';
echo '<legend>'; echo '<legend>';
} }
?> ?>
Language <a href="./translators.html" target="documentation"><?php Language <a href="./translators.html" target="documentation"><?php
if ( $cfg['ReplaceHelpImg'] ) { if ( $cfg['ReplaceHelpImg'] ) {
echo '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 'b_info.png" width="11" height="11" alt="Info" />'; echo '<img class="icon" src="' . $GLOBALS['pmaThemeImage']
. 'b_info.png" width="11" height="11" alt="Info" />';
} else { echo '(*)'; } } else { echo '(*)'; }
?></a> ?></a>
<?php <?php
@@ -59,8 +67,8 @@ function PMA_select_language($use_fieldset = FALSE) {
echo ':'; echo ':';
} }
?> ?>
<select name="lang" onchange="this.form.submit();">
<select name="lang" onchange="this.form.submit();">
<?php <?php
uasort($GLOBALS['available_languages'], 'PMA_language_cmp'); uasort($GLOBALS['available_languages'], 'PMA_language_cmp');
@@ -69,8 +77,8 @@ function PMA_select_language($use_fieldset = FALSE) {
// Include native name if non empty // Include native name if non empty
if (!empty($tmplang[3])) { if (!empty($tmplang[3])) {
$lang_name = '<bdo dir="ltr" lang="' . $tmplang[2] . '">' $lang_name = htmlentities($tmplang[3], ENT_COMPAT, 'UTF-8') . ' - '
. htmlentities($tmplang[3], ENT_COMPAT, 'UTF-8') . '</bdo> - ' . $lang_name; . $lang_name;
} }
// Include charset if it makes sense // Include charset if it makes sense
@@ -85,31 +93,36 @@ function PMA_select_language($use_fieldset = FALSE) {
$selected = ''; $selected = '';
} }
echo ' '; echo ' ';
echo '<option value="' . $id . '"' . $selected . '>' . $lang_name . '</option>' . "\n"; echo '<option value="' . $id . '"' . $selected . '>' . $lang_name
. '</option>' . "\n";
} }
?> ?>
</select>
</select>
<?php <?php
if ($use_fieldset) { if ($use_fieldset) {
echo '</fieldset>'; echo '</fieldset>';
} }
?> ?>
<noscript>
<noscript>
<?php <?php
if ($use_fieldset) { if ($use_fieldset) {
echo '<fieldset class="tblFooters">'; echo '<fieldset class="tblFooters">';
} }
?> ?>
<input type="submit" value="Go" />
<input type="submit" value="Go" />
<?php <?php
if ($use_fieldset) { if ($use_fieldset) {
echo '</fieldset>'; echo '</fieldset>';
} }
?> ?>
</noscript>
</bdo> </noscript>
</form> </bdo>
<?php </form>
<?php
} // End of function PMA_select_language } // End of function PMA_select_language
?> ?>