Giter Site home page Giter Site logo

blasanka / aws_translate_plugin Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 85 KB

AWS translate plugin for Flutter(This is not from Official AWS) but this plugin uses native Android and IOS AWS Translate official libraries.

License: Other

Java 30.68% Swift 26.43% Objective-C 3.99% Dart 33.43% Ruby 5.46%

aws_translate_plugin's Introduction

aws_translate

AWS Translate plugin to translate a text / paragraph with translating status.

DISCLAIMER: This is not an AWS officially released plugin but this plugin uses AWS official Android native and IOS native AWS plugins (So nothing to be worried). Check the package implementation on github: https://github.com/Blasanka/aws_translate_plugin

All the support translate languages by AWS official Android and IOS libraries are supported in this plugin also with auto.

Available languages:

Please refer this for support languages and their codes: https://docs.aws.amazon.com/translate/latest/dg/translate-dg.pdf

Example:

AwsTranslate awsTranslate = AwsTranslate(
    poolId: poolId, // your pool id here
    region: Regions.AP_NORTHEAST_2); // your region here

// from parameter is default to ``auto``
String textToTranslate = 'If you press on this text, I can translate this text for you.';
String translated = await awsTranslate.translateText(textToTranslate, to: 'es');
if (!mounted) return;
print(textToTranslate);
setState(() => textToTranslate = translated);

A complete example can be found in the example directory.

All available regions for Android are support for this Flutter plugin.

/// Enumeration of region names
enum Regions {
  GovCloud,
  US_GOV_EAST_1,
  US_EAST_1,
  US_EAST_2,
  US_WEST_1,
  US_WEST_2, ///Default: The default region of AWS Android SDK
  EU_WEST_1,
  EU_WEST_2,
  EU_WEST_3,
  EU_CENTRAL_1,
  EU_NORTH_1,
  AP_EAST_1,
  AP_SOUTH_1,
  AP_SOUTHEAST_1,
  AP_SOUTHEAST_2,
  AP_NORTHEAST_1,
  AP_NORTHEAST_2,
  SA_EAST_1,
  CA_CENTRAL_1,
  CN_NORTH_1,
  CN_NORTHWEST_1,
  ME_SOUTH_1
}

For to show something while translate, use getTranslateStatus and below are supported translate types:

enum TranslateStatus {
  NONE,
  ERROR,
  TRANSLATING,
  COMPLETED
}

Contributes and issues are welcome!

aws_translate_plugin's People

Contributors

blasanka avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rajarajan1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.