<?php

// do not allow this page without the load of wordpress!
if (WCT_PHP_ON !== true) { exit; }

$zusatz = "";

if (strpos($content,"strftime") !== false) {
	if(!function_exists('qtrans_getLanguage')){function qtrans_getLanguage(){}}

	if (qtrans_getLanguage() != '') {
		$lang = substr(qtrans_getLanguage(),0,2);
	}
	else {
		$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2);
	}

	if ($lang == "en") {
		$zusatz = "putenv('LC_ALL=en_US.utf8');\nsetlocale(LC_ALL, 'en_US.utf8');\n";
	}
	elseif($lang == "de"){
		$zusatz = "putenv('LC_ALL=de_DE.utf8');\nsetlocale(LC_ALL, 'de_DE.utf8');\n";
	}
}

// eval is used for the wctphp smarttag
eval($zusatz."\n\$out = ".$content.";");

?>