I have a scenario where i have to check if message contains any regional language then the type should be "2" or if it contains English(can contains special char, digits) language then the type should be "0".

I have tried using 

```
for (char c: messages.get(0).message().toCharArray()) {
            if (Character.UnicodeBlock.of(c) == 
                     Character.UnicodeBlock.DEVANAGARI) {
                isHindi = true;
                break;
            }
        }

```

but in java it checks for each specific language.

I want to write generalise code for that.
Thanks