예제 #1
0
    //if(CONV_REQUEST && (!empty($_GET)||!empty($_POST))){
    if (!empty($_POST)) {
        $in_charset = $xlanguage["charset"];
        $out_charset = $xlanguage["charset_base"];
        //$CONV_REQUEST_array=array("_GET", "_POST");
        $CONV_REQUEST_array = array("_POST");
        foreach ($CONV_REQUEST_array as $HV) {
            if (!empty(${$HV})) {
                ${$HV} = xlanguage_convert_encoding(${$HV}, $out_charset, $in_charset);
            }
            $GLOBALS["HTTP" . $HV . "_VARS"] = ${$HV};
        }
    }
    ob_start("xlanguage_encoding");
} else {
    ob_start("xlanguage_ml");
}
/*
 * hardcoded scripts for language switching in theme html files
 *
 * To use it:
 * 1 set "$xlanguage_theme_enable = true;"
 * 2 config options "$options = array("images", " ", 5); // display mode, delimitor, number per line"; Options for display mode: image - flag; text - text; dropdown - dropdown selection box with text
 * 3 insert "<{$smarty.const.XLANGUAGE_SWITCH_CODE}>" into your theme html anywhere you would like to see it present
 */
$xlanguage_theme_enable = true;
if (!empty($xlanguage_theme_enable)) {
    $options = array("dropdown", " ", 5);
    // display mode, delimitor, number per line
    xlanguage_select_show($options);
}
예제 #2
0
 /**
  * @param array $args
  */
 public static function eventCoreHeaderCheckcache($args)
 {
     $xoops = Xoops::getInstance();
     xlanguage_select_show(explode('|', $xoops->registry()->get('XLANGUAGE_THEME_OPTIONS')));
 }