In case anyone is interested.... Function IsHebrew($string) { If(ereg('[?-?]',$string,$regs)) { Echo"Hebrew"; }Else{ Echo"English"; } }
Not everyone can see the [?-?]. In any case this can be good for any language.... berber -----Original Message----- From: Boaz Yahav Sent: Monday, April 15, 2002 8:44 PM To: PHP General (E-mail) Subject: [PHP] Detecting language Hi I have an application that works with two languages. I'm trying to write a function that will tell me if a string contains only English or also chars from the other language. It's enough that there is one char of a different language to make the function return a true value. I guess I'm not inventing the wheel here... Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php