You can get the keyboard language by first defining the keyboard language of the device, and then getting the Locale object from it. For instance,
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); InputMethodSubtype ims = imm.getCurrentInputMethodSubtype(); String localeString = ims.getLocale(); Locale locale = new Locale(localeString); String currentLanguage = locale.getDisplayLanguage();
Here, currentLanguage will provide you with the language of your keyboard. Hope this helps.
source share