Is there a way to detect the language of the data being entered via the input field?
I assume you're referring to a Unicode string... in which case, just look for the presence of any character with a code between U+0600–U+06FF (1536–1791) in the string.