PHP: How do I detect if an input string is Arabic

后端 未结 10 1376
旧时难觅i
旧时难觅i 2020-12-08 08:34

Is there a way to detect the language of the data being entered via the input field?

10条回答
  •  既然无缘
    2020-12-08 08:51

    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

提交回复
热议问题