public static function transliterate($text, $direction = "en") {
        if ($direction == "en") {
            $text = str_replace(self::$_cyrillicTranslit, self::$_latinTranslit, $text);
        } else {
            $text = str_replace(self::$_latinTranslit, self::$_cyrillicTranslit, $text);
        }

        $text = preg_replace("#([qwrtpsdfghklzxcvbnmQWRTPSDFGHKLZXCVBNM]+)[jJ]e#", "\${1}e", $text);
        $text = preg_replace("#([qwrtpsdfghklzxcvbnmQWRTPSDFGHKLZXCVBNM]+)[jJ]#", "\${1}'", $text);
        $text = preg_replace("#([ eyuioaEYUIOA-]+)[Kk]h#", "\${1}h", $text);
        $text = preg_replace("#^kh#", "h", $text);
        $text = preg_replace("#^Kh#", "H", $text);

        return $text;
    }