I've been working on a project that involves processing text in different languages using PHP. Specifically, I'm trying to determine whether a PHP variable contains Hindi text or not. I wanted to know if any of you have come across a solution or know of any techniques to achieve this.
I've tried a few approaches like using regular expressions to check for specific Hindi characters or checking the Unicode character range for Hindi scripts. However, these methods seem a bit unreliable and I'm not sure if I'm missing something.
Any insights, suggestions, or alternative methods to accurately detect Hindi text within a PHP variable would be greatly appreciated. Thank you in advance for your help!