i have a textarea to send sms from my website , and i accept arabic and latin sms message

i have to test if the text entered is arabic or Latin

any sugestion please ?