MrRoboto Posted December 3, 2011 Share Posted December 3, 2011 Hello there everyone! In chapter 14, i found the collation easy and simple to accomplish using the Collator object in PHP 5, but i haven't yet been able to accomplish transliterstion into different languages and character sets( Script 14.4 Trans.php ). I've tried to use iconv to get script 14.4 to work, but so far, it has failed me. And looking at the manual, the Transliterator object should be able to help me do this, but the documentation is vague and unsatisfactory at best. Has anyone else tackled transliteration in script 14.4 using PHP 5? Link to comment Share on other sites More sharing options...
Larry Posted December 8, 2011 Share Posted December 8, 2011 Sorry I haven't replied yet; been very busy. Let me see if I can't provide you with the exact code in a couple of days. Link to comment Share on other sites More sharing options...
Larry Posted January 28, 2012 Share Posted January 28, 2012 Terribly, terribly sorry for the delay on this. I've been wrapping up a book (way behind schedule) that I just finished two days ago. Then I had to install a custom version of PHP. The good news is that I was able to fix this, and the fix is easy. The bad news is that it requires PHP 5.4. Once you have PHP5.4, you only need to change the function call in trans.php: echo "<p>$me is " . transliterator_transliterate ("Latin-$script", $me) . " in $script.</p>\n"; Originally the function call was: echo "<p>$me is " . str_transliterate($me, 'Latin', $script) . " in $script.</p>\n"; I just tested it myself and it works fine. Let me know if you have any questions or problems. Apologies again for the delay! Link to comment Share on other sites More sharing options...
Recommended Posts