public static function getCharsetDropdownBox($name = null, $id = null, $default = null, $label = true, $submitOnChange = false)
{
self::loadCharsets();
if (empty($name)) {
$name = 'character_set';
}
$return_str = '<select lang="en" dir="ltr" name="' . htmlspecialchars($name) . '"' . (empty($id) ? '' : ' id="' . htmlspecialchars($id) . '"') . ($submitOnChange ? ' class="autosubmit"' : '') . '>' . "\n";
if ($label) {
$return_str .= '<option value="">' . __('Charset') . '</option>' . "\n";
}
$return_str .= '<option value=""></option>' . "\n";
foreach (self::$_charsets as $current_charset) {
$current_cs_descr = empty(self::$_charsets_descriptions[$current_charset]) ? $current_charset : self::$_charsets_descriptions[$current_charset];
$return_str .= '<option value="' . $current_charset . '" title="' . $current_cs_descr . '"' . ($default == $current_charset ? ' selected="selected"' : '') . '>' . $current_charset . '</option>' . "\n";
}
$return_str .= '</select>' . "\n";
return $return_str;
}