microsoft_azure_translator

Last updated:

0 purchases

microsoft_azure_translator Image
microsoft_azure_translator Images
Add to Cart

Description:

microsoft azure translator

This package allows you to quickly set up Microsoft Azure Translator for Flutter.
Features #

Implement translation out of the box
Suitable for languages like Cantonese that does not work well in Google translate
All you need is your Ocp-Apim-Subscription-Key & Ocp-Apim-Subscription-Region from Azure

Getting started #
Head our to this link tocreate your Azure account and setup translator resources:
https://learn.microsoft.com/en-gb/azure/cognitive-services/Translator/create-translator-resource
Usage #
Initialize the translator by passing the subscriptKey andsubscriptionRegion
MicrosoftAzureTranslator.initialize(dotenv.env['MICROSOFT_AZURE_SUBSCRIPTION_KEY']!, dotenv.env['MICROSOFT_AZURE_SUBSCRIPTION_REGION']!);

List<dynamic>? translated = await MicrosoftAzureTranslator.instance.translate("how are you?", "en", "yue");

if (translated != null) {
print('received translation from package..');
print(translated);

translated.forEach((translatedItem) {
print(translatedItem);
print(translatedItem["text"]);
});
}
copied to clipboard
Additional information #
TODO:

Allow passing a list of languages codes to be translated at once

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.