detectLanguage method

Future<DetectLanguageCallbackResult> detectLanguage(
  1. String text
)

Detects the language of the provided text using CLD. text User input string to be translated.

Implementation

Future<DetectLanguageCallbackResult> detectLanguage(String text) async {
  var $res = await promiseToFuture<$js.DetectLanguageCallbackResult>(
      $js.chrome.i18n.detectLanguage(text));
  return DetectLanguageCallbackResult.fromJS($res);
}