Possible Duplicate:
detect language from string in PHP
how can i detect the lang of the user input string?
for exemple the string:
בדיקה בלה בלה heb אחד שתיים שלוש
will give the result: hebrew
10x!
Possible Duplicate:
detect language from string in PHP
how can i detect the lang of the user input string?
for exemple the string:
בדיקה בלה בלה heb אחד שתיים שלוש
will give the result: hebrew
10x!
The easiest way would be to compare the string with a database of dictionaries, and depending on which dictionary the word is contained within, you can find the language.
However, caveats