Skip to main content

MLKitTranslate

Plugin that implements MLKit Translation and Language Identification features.

https://github.com/rigelglen/cordova-plugin-mlkit-translate

Stuck on a Cordova issue?

Don't waste precious time on plugin issues.

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Installation#

$ npm install cordova-plugin-mlkit-translate
$ npm install @ionic-native/mlkit-translate
$ ionic cap sync

Supported Platforms#

  • Android
  • iOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { MLKitTranslate } from '@ionic-native/ml-kit-translate';
constructor(private mlkitTranslate: MLKitTranslate) { }
...
this.mlkitTranslate.translate('Hello', 'en', 'es')
.then((resultText: string) => console.log(res))
.catch((error: string) => console.error(error));
@interfaces
LanguageModel