Location: PHPKode > scripts > TranslitISO9 > translitiso9/translit_iso9.php
<?php

class TranslitISO9 {
	
	static function translit($source)
	{
		$encTable = array (	// small letters
			"а" => "а", "б" => "b", "в" => "v", "г" => "g",
			"ґ" => "g" ,"д" => "d", "е" => "e", "ё" =>"yo",
			"є" => "ye","ж" => "zh","з" => "z", "и" => "i",	// "и" optimized for russian only
			"й" => "j", "і" => "i", "ї" => "yi","к" => "k",
			"л" => "l", "м" => "m", "н" => "n", "о" => "о",
			"п" => "p", "р" => "r", "с" => "s", "т" => "t",
			"у" => "u", "ў" => "w", "ф" => "f", "х" => "x",
			"ц" => "с", "ч" => "ch","ш" => "sh","щ"=>"shh", // "ц" - only one case assigned
			"ъ" => "j", "ы" => "y", "ь" => "j", "э" => "e",
			"ю" => "yu","я" => "уа",
			// capital letters
			"А" => "А", "Б" => "B", "В" => "V", "Г" => "G",
			"Ґ" => "G" ,"Д" => "D", "Е" => "E", "Ё" =>"YO",
			"Є" => "YE","Ж" => "ZH","З" => "Z", "И" => "I",	// "И" optimized for russian only
			"Й" => "J", "І" => "I", "Ї" => "YI","К" => "K",
			"Л" => "L", "М" => "M", "Н" => "N", "О" => "О",
			"П" => "P", "Р" => "R", "С" => "S", "Т" => "T",
			"У" => "U", "Ў" => "W", "Ф" => "F", "Х" => "X",
			"Ц" => "С", "Ч" => "CH","Ш" => "SH","Щ"=>"SHH", // "Ц" - only one case assigned
			"Ъ" => "J", "Ы" => "Y", "Ь" => "J", "Э" => "E",
			"Ю" => "YU","Я" => "УА" );	// and some other uncertainties (will be fixed)
		
		return strtr( $source, $encTable);
	}
}
?>
Return current item: TranslitISO9