#raw html block with gateways
$htmlblock=<<<%xlng_title%>
<%xlng_subtitle%>
<%xlng_bbuuuuk-asd%>
<%xlng_buk%>
EOD;
#block of xlng strings
$xlngblock=file_get_contents("section.xlng");
#sample data:
#
$xlng_lng="_sk";
$matches;
if(preg_match_all("/<%xlng_(.*?)%>/", $htmlblock, $matches, PREG_PATTERN_ORDER))
{
echo count($matches);
for($i=0; $i/", $xlngblock, $match))
{
$xlngstring=$match[1];
}
$htmlblock = preg_replace("/<%xlng_".$matches[1][$i]."%>/", $xlngstring, $htmlblock);
}
}
echo $htmlblock;
?>