Limit text field language input

newbie-question

#1

Hi,

I want to create a text field with e-mail input and the input must be in English instead of other languages.
it there a way of doing it ?

Basically this is what I want:

OnKeyUp
if text on This equals value (not english)
Set text on This equal to “”

Thanks,


#2

That’s not really possible. How would you know if it’s English or not?

The word “Die” is both English and German, for example. You’d have to somehow integrate a language detection service.


#3

Google has an API for this with their Translate tool: https://cloud.google.com/translate/docs/ including detecting languages.

Hmmm, sounds like a job for Gregor …or nkrisc :wink:


#4

Maybe I should have pointed out that the language that I don’t want to be in the e-mail text field is Hebrew, which is nothing like English or German :slight_smile:


#5

Then you might be able to use cases like so:

IF Text on widget WidgetName IS alphanumeric
Do your thing
ELSE IF true
What happens when the first case is false

That might not consider non-Latin characters, such as Hebrew, as not “alpha” which might work for what you need then. Give that a shot.


#6

If you do this Axure. What happens in production. Better to simulate it.


#7

Almost working, but
“.” (dot) and “@” sign are not alphanumeric