Plugin implementing Language Identification on Android & iOS using Google's on-device ML library - ML Kit
Google's ML Kit SDK helps us to identify the language of a string of text. We can get the string's most likely language as well as a list of all the possible languages alongwith confidence scores. This plugin provides a Typescript API to interact with the native ML Kit libraries on iOS and Android.
const languageIdentifier: LanguageIdentifier = LanguageIdentification.getClient();
const response = await languageIdentifier.identifyLanguage('This is some english');
const response = await languageIdentifier.identifyPossibleLanguages('This is some english');