PMA\libraries\Encoding::canConvertKanji PHP Метод

canConvertKanji() публичный статический Метод

Detects whether Kanji encoding is available
public static canConvertKanji ( ) : boolean
Результат boolean
    public static function canConvertKanji()
    {
        return $GLOBALS['lang'] == 'ja' && function_exists('mb_convert_encoding');
    }

Usage Example

Пример #1
0
/**
 * Prints Html For Export Options Format-specific options
 *
 * @param ExportPlugin[] $export_list Export List
 *
 * @return string
 */
function PMA_getHtmlForExportOptionsFormat($export_list)
{
    $html = '<div class="exportoptions" id="format_specific_opts">';
    $html .= '<h3>' . __('Format-specific options:') . '</h3>';
    $html .= '<p class="no_js_msg" id="scroll_to_options_msg">';
    $html .= __('Scroll down to fill in the options for the selected format ' . 'and ignore the options for other formats.');
    $html .= '</p>';
    $html .= PMA_pluginGetOptions('Export', $export_list);
    $html .= '</div>';
    if (Encoding::canConvertKanji()) {
        // Japanese encoding setting
        $html .= '<div class="exportoptions" id="kanji_encoding">';
        $html .= '<h3>' . __('Encoding Conversion:') . '</h3>';
        $html .= Encoding::kanjiEncodingForm();
        $html .= '</div>';
    }
    $html .= '<div class="exportoptions" id="submit">';
    $html .= PMA\libraries\Util::getExternalBug(__('SQL compatibility mode'), 'mysql', '50027', '14515');
    global $cfg;
    if ($cfg['ExecTimeLimit'] > 0) {
        $html .= '<input type="submit" value="' . __('Go') . '" id="buttonGo" onclick="check_time_out(' . $cfg['ExecTimeLimit'] . ')"/>';
    } else {
        // if the time limit set is zero, then time out won't occur
        // So no need to check for time out.
        $html .= '<input type="submit" value="' . __('Go') . '" id="buttonGo" />';
    }
    $html .= '</div>';
    return $html;
}
All Usage Examples Of PMA\libraries\Encoding::canConvertKanji