How to determine a string is English or Persian?

后端 未结 5 921
南笙
南笙 2021-01-11 17:45

I have edittext in a form, I want that when the user inputs text into the edittext for my program to detect which language was inserted into the edittext.

Is there a

5条回答
  •  礼貌的吻别
    2021-01-11 18:14

    Why don't you evaluate it when keyboard is popup.. Means You can do it by getting the language of phone... here is the method useLocale.getDefault().getDisplayLanguage(); minSDK is 11 is required.

提交回复
热议问题