RE: [PHP] Detecting language
| From: | Boaz Yahav | Date: | Mon, 15 Apr 2002 18:57:03 +0000 |
| Subject: | RE: [PHP] Detecting language | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93054@lists.php.net to get a copy of this message | ||
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