| px | top | add code | search | signup | login | help |
<?PHP
//--------------------------------------------------
// Title........: Convert Turkish letters to English
// Filename.....: tur2eng.php
// Author.......: Varol Keskin
// Version......: 1.0
// Date.........: 15/08/2002
//--------------------------------------------------
function tur2eng ( $return_string )
{
// define or select the language before using the function.
// 1 for English, 2 for Turkish
global $current_language;
if ( $current_language )
{
$return_string = str_replace( "ç", "c", $return_string);
$return_string = str_replace( "Ç", "C", $return_string);
$return_string = str_replace( "ð", "g", $return_string);
$return_string = str_replace( "Ð", "G", $return_string);
$return_string = str_replace( "ý", "i", $return_string);
$return_string = str_replace( "Ý", "I", $return_string);
$return_string = str_replace( "ö", "o", $return_string);
$return_string = str_replace( "Ö", "O", $return_string);
$return_string = str_replace( "þ", "s", $return_string);
$return_string = str_replace( "Þ", "S", $return_string);
$return_string = str_replace( "ü", "u", $return_string);
$return_string = str_replace( "Ü", "U", $return_string);
}
return $return_string;
}
?>
Comments or questions?
PX is running PHP 5.2.11
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.