Yanga.Module.Translate
1.0.0
See the version list below for details.
dotnet add package Yanga.Module.Translate --version 1.0.0
NuGet\Install-Package Yanga.Module.Translate -Version 1.0.0
<PackageReference Include="Yanga.Module.Translate" Version="1.0.0" />
paket add Yanga.Module.Translate --version 1.0.0
#r "nuget: Yanga.Module.Translate, 1.0.0"
// Install Yanga.Module.Translate as a Cake Addin #addin nuget:?package=Yanga.Module.Translate&version=1.0.0 // Install Yanga.Module.Translate as a Cake Tool #tool nuget:?package=Yanga.Module.Translate&version=1.0.0
REST API Wrapper for Google Translation Service
This project provides a REST API wrapper for the Google Translation Service, allowing you to easily integrate translation capabilities into your applications. The wrapper simplifies the process of making translation requests to the Google API by encapsulating the necessary HTTP requests and authentication.
Features
5 translation services:
- Google Translate API (Free first 500,000 characters)
- Google Translate (old and new APIs)
- Bing Translator
- Microsoft Azure Translator
- Yandex.Translate
- Google Vertex AI allowing multiple translation with just 1 request
Support for translation, transliteration, language detection and text-to-speech in the included translators.
Support for all the languages of each translator.
A language class with methods for getting the supported languages and determining the availability of a language in a specific translator.
Interfaces, allowing to write custom translators and languages.
An
AggregateTranslator
class that groups the default translators for ease of use with the ability to add custom translators.
Usage
To use this REST API wrapper, follow the steps below:
Installation:
- Clone this repository or download the code to your project directory.
- Add the necessary configuration for your Google Translation API credentials.
Usage:
var translations = await _translateApiWrapper.GetTranslationAsync( TranslatorOwner.GoogleTranslator, Bonjour", "fr", "en", "apiKey");
Translator Owner:
- TranslatorOwner.BingTranslator: Bing Translator
- TranslatorOwner.GoogleApiV3NotFreeTranslator: First 500.000 characters are free every month after that we will receive an error quota limit.
- TranslatorOwner.GoogleTranslator = "google-translator";
- TranslatorOwner.GoogleTranslator2 = "google-translator-2";
- TranslatorOwner.MicrosoftTranslator = "microsoft-translator";
- TranslatorOwner.YandexTranslator = "yandex-translator";
public async Task<List<GoogleTranslationResult>> GetTranslationAsync(string translateOwner, string text, string from, string to, string apiKey)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Microsoft.Extensions.Configuration.Binder (>= 7.0.4)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.7.0 | 125 | 8/18/2024 |
1.6.5 | 106 | 8/18/2024 |
1.6.4 | 109 | 8/18/2024 |
1.6.3 | 115 | 8/18/2024 |
1.6.2 | 94 | 8/11/2024 |
1.6.1 | 73 | 8/6/2024 |
1.6.0 | 74 | 8/4/2024 |
1.5.1 | 74 | 7/25/2024 |
1.5.0 | 71 | 7/21/2024 |
1.4.1 | 96 | 6/29/2024 |
1.4.0 | 110 | 5/22/2024 |
1.3.0 | 128 | 3/14/2024 |
1.2.1 | 143 | 11/10/2023 |
1.2.0 | 154 | 10/17/2023 |
1.0.1 | 151 | 10/15/2023 |
1.0.0 | 151 | 10/13/2023 |