2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Code for displaying language selection
8 if (! defined('PHPMYADMIN')) {
13 * Sorts available languages by their true english names
15 * @param array the array to be sorted
16 * @param mixed a required parameter
17 * @return the sorted array
20 function PMA_language_cmp(&$a, &$b) {
21 return (strcmp($a[1], $b[1]));
22 } // end of the 'PMA_language_cmp()' function
25 * Displays for for language selection
29 function PMA_select_language($use_fieldset = FALSE, $show_doc = TRUE) {
33 <form method
="post" action
="index.php" target
="_parent">
35 $_form_params = array(
36 'db' => $GLOBALS['db'],
37 'table' => $GLOBALS['table'],
39 echo PMA_generate_common_hidden_inputs($_form_params);
41 // For non-English, display "Language" with emphasis because it's
42 // not a proper word in the current language; we show it to help
43 // people recognize the dialog
44 $language_title = __('Language')
45 . (__('Language') != 'Language' ?
' - <em>Language</em>' : '');
47 $language_title .= PMA_showDocu('faq7_2');
50 echo '<fieldset><legend xml:lang="en" dir="ltr">' . $language_title . '</legend>';
52 echo '<bdo xml:lang="en" dir="ltr">' . $language_title . ':</bdo>';
56 <select name
="lang" onchange
="this.form.submit();" xml
:lang
="en" dir
="ltr">
59 uasort($GLOBALS['available_languages'], 'PMA_language_cmp');
60 foreach ($GLOBALS['available_languages'] as $id => $tmplang) {
61 $lang_name = PMA_langName($tmplang);
63 //Is current one active?
65 $selected = ' selected="selected"';
71 echo '<option value="' . $id . '"' . $selected . '>' . $lang_name
86 echo '<fieldset class="tblFooters">';
90 <input type
="submit" value
="Go" />
100 } // End of function PMA_select_language