View file phpBB-WAP(wml)_by_chel/includes/functions_translit.php

File size: 1.41Kb
<?
function translit($text_to_translit)
{
$trans = array(
		"Sch" => "&#1065;", 	"sch" => "&#1097;",
		"Yu" => "&#1070;",	"yu" => "&#1102;",
		"Ya" => "&#1071;",	"ya" => "&#1103;",	
		"Yo" => "&#1025;",	"yo" => "&#1105;",
		"Zh" => "&#1046;",	"zh" => "&#1078;",
		"Ch" => "&#1063;",	"ch" => "&#1095;",
		"Sh" => "&#1064;",	"sh" => "&#1096;",	
		"'/" => "&#1069;",	"/" => "&#1101;",
		"A"=>"A",	"a"=>"a",
		"B"=>"&#1041;",	"b"=>"&#1073;",
		"C"=>"&#1062;",	"c"=>"&#1094;",
		"D"=>"&#1044;",	"d"=>"&#1076;",
		"E"=>"E",	"e"=>"e",
		"F"=>"&#1060;",	"f"=>"&#1092;",
		"G"=>"&#1043;",	"g"=>"&#1075;",
		"H"=>"&#1061;",	"h"=>"&#1093;",
		"I"=>"&#1048;",		"i"=>"&#1080;",
		"J"=>"&#1046;",		"j"=>"&#1078;",
		"K"=>"K",	"k"=>"&#1082;",
		"L"=>"&#1051;",	"l"=>"&#1083;",
		"M"=>"M",	"m"=>"&#1084;",
		"N"=>"&#1053;",	"n"=>"&#1085;",
		"O"=>"O",	"o"=>"o",
		"P"=>"&#1055;",	"p"=>"&#1087;",
		"R"=>"&#1056;",	"r"=>"&#1088;",
		"S"=>"&#1057;",	"s"=>"&#1089;",
		"T"=>"T",	"t"=>"&#1090;",
		"U"=>"&#1059;",	"u"=>"&#1091;",
		"V"=>"&#1042;",	"v"=>"&#1074;",
		"W"=>"&#1064;",	"w"=>"&#1096;",
		"X"=>"&#1067;",	"x"=>"&#1099;",
		"Y"=>"&#1049;",	"y"=>"&#1081;",
		"Z"=>"3",	"z"=>"&#1079;",
		"''"=>"&#1068;",	"'"=>"&#1100;",
		"``"=>"&#1066;",	"`"=>"&#1098;",

		"~"=>"");

foreach ($trans as $lat => $rus) { $text_to_translit = str_replace($lat, $trans[$lat], $text_to_translit); }
return $text_to_translit;
}
?>