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)
22 return (strcmp($a[1], $b[1]));
23 } // end of the 'PMA_language_cmp()' function
26 * Displays for for language selection
30 function PMA_select_language($use_fieldset = false, $show_doc = true)
35 <form method
="post" action
="index.php" target
="_parent">
37 $_form_params = array(
38 'db' => $GLOBALS['db'],
39 'table' => $GLOBALS['table'],
41 echo PMA_generate_common_hidden_inputs($_form_params);
43 // For non-English, display "Language" with emphasis because it's
44 // not a proper word in the current language; we show it to help
45 // people recognize the dialog
46 $language_title = __('Language')
47 . (__('Language') != 'Language' ?
' - <em>Language</em>' : '');
49 $language_title .= PMA_showDocu('faq7_2');
52 echo '<fieldset><legend xml:lang="en" dir="ltr">' . $language_title . '</legend>';
54 echo '<bdo xml:lang="en" dir="ltr">' . $language_title . ':</bdo>';
58 <select name
="lang" class="autosubmit" xml
:lang
="en" dir
="ltr">
61 uasort($GLOBALS['available_languages'], 'PMA_language_cmp');
62 foreach ($GLOBALS['available_languages'] as $id => $tmplang) {
63 $lang_name = PMA_langName($tmplang);
65 //Is current one active?
67 $selected = ' selected="selected"';
73 echo '<option value="' . $id . '"' . $selected . '>' . $lang_name
88 echo '<fieldset class="tblFooters">';
92 <input type
="submit" value
="Go" />
102 } // End of function PMA_select_language