Identifying a language
Identifying a language can be useful when you get some text information from your users, and you need to respond in the appropriate language.
This is where the ML Kit language package comes to help. By passing some text to the package, you are able to recognize the language of the text. Once you know the language, you can later translate it into one of the other supported languages.
Getting ready
Before following this recipe, you should have completed the Using the device camera and Recognizing text from an image recipes in this chapter.
How to do it...
In this recipe, you will build a screen where users can type some text, and you will identify the language of the text. Follow these steps:
- Add the latest version of the
google_mlkit_language_id
package to your project:flutter pub add google_mlkit_language_id
- In the
ml.dart
file, import the new package:import 'package:google_mlkit_language_id...