I am using these code to check if a string is in English or not.
<?php
$string="で書くタッチイベント (フ";
if(!preg_match('/[^\W_ ] /',$string)) {
echo "Please enter English words only:(";
} else {
echo "OK, English Detected!";
}
?>
It cant provide perfect result because string like "some english text で書くタッチイベント (フ"
this also detects as English language, any idea?