Is there a way to detect the language of the data being entered via the input field?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
this will check if the string is Arabic Or has Arabic text
text must be UNICODE e.g UTF-8
I'm not aware of a PHP solution for this, no.
The Google Translate Ajax APIs may be for you, though.
Check out this Javascript snippet from the API docs: Example: Language Detection
The PHP Text_LanguageDetect library is able to detect 52 languages. It's unit-tested and installable via composer and PEAR.