Code:
<?php
############################################
# made by vladimir nikolic #
# #
# create new file in smarty/plugins #
# save file as modifier.utf.php #
# smarty plugin for utf8 to 1250 #
# #
# how to use: #
# { $sometext | utf } #
# thats all folks #
############################################
function smarty_modifier_utf ($tekst)
{
$ulazni = array("ÄŤ","š","Ĺľ","Ĺ","Ä‘","ć","Ä?","ÄŚ","Ĺ ");
$izlazni = array("č","š","ž","Š","đ","ć","Đ","Č","Š");
$tekst = str_replace($ulazni, $izlazni, $tekst);
return $tekst;
}
?>
<?php
############################################
# made by vladimir nikolic #
# #
# create new file in smarty/plugins #
# save file as modifier.utf.php #
# smarty plugin for utf8 to 1250 #
# #
# how to use: #
# { $sometext | utf } #
# thats all folks #
############################################
function smarty_modifier_utf ($tekst)
{
$ulazni = array("ÄŤ","š","Ĺľ","Ĺ","Ä‘","ć","Ä?","ÄŚ","Ĺ ");
$izlazni = array("č","š","ž","Š","đ","ć","Đ","Č","Š");
$tekst = str_replace($ulazni, $izlazni, $tekst);
return $tekst;
}
?>