language_detector 1.0.1 copy "language_detector: ^1.0.1" to clipboard
language_detector: ^1.0.1 copied to clipboard

Detect language of any text.

Language Detector #

Detect language of any text.

Simulator Screenshot - iPhone 15 Pro - 2024-05-08 at 14 21 11 (1)

Getting started #

Add this to your package's pubspec.yaml file

dependencies:
  language_detector: ^1.0.1

Usage #

Next, you just have to import the package using:

import 'package:language_detector/language_detector.dart';
  Widget build(BuildContext context) {
   return OutlinedButton(
              onPressed: () async {
              var language = await LanguageDetector.getLanguageName(
                    content: 'helo');
              var code = await LanguageDetector.getLanguageCode(
                    content: 'helo');      
              },
              child: const Text("Get Language >"),
            ),
  }

Additional information #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

1
likes
150
points
440
downloads

Publisher

verified publishersivaprasadnk.dev

Weekly Downloads

Detect language of any text.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, translator

More

Packages that depend on language_detector