OpenTranslate-beta 1.0.0.8

dotnet add package OpenTranslate-beta --version 1.0.0.8
NuGet\Install-Package OpenTranslate-beta -Version 1.0.0.8
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenTranslate-beta" Version="1.0.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OpenTranslate-beta --version 1.0.0.8
#r "nuget: OpenTranslate-beta, 1.0.0.8"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OpenTranslate-beta as a Cake Addin
#addin nuget:?package=OpenTranslate-beta&version=1.0.0.8

// Install OpenTranslate-beta as a Cake Tool
#tool nuget:?package=OpenTranslate-beta&version=1.0.0.8

OpenTranslate

OpenTranslate is an open-source translation engine that offers quality translations for various applications. It supports asynchronous usage, providing versatility for different use cases. OpenTranslate is a practical solution for those seeking reliable translations with a balance between performance and resource efficiency.

Optimizations

We've made several enhancements to OpenTranslate to make it even better for you: We have fixed the json mismatch errors and we have updated the samples. Better error handling: We understand that errors can be frustrating, so we've improved our error handling to provide more informative feedback and recover smoothly from unexpected situations. Squashing bugs: We found and fixed some pesky bugs that caused empty JSON strings to be returned, making the package more reliable and stable for you to use. OCR document translations: We wanted to make OpenTranslate even more versatile, so we added Optical Character Recognition (OCR) support for document translations. Now, you can translate documents with ease, saving you time and effort.

Package Dependencies

Package Version
Newtonsoft.Json 13.0.3
IronOcr 2023.4.13
IronOcr.MacOs 2023.4.13

Usage/Examples

GetTranslation(Sentence or Phrase, laguage from, language to);

Languages need to be specified in ISO 639-1 format like below:

using OpenTranslate;

var engine = new OpenTranslateClient();

string json = await engine.GetTranslation("Hello, May the force be with you.", "es");

Results results = JsonSerializer.Deserialize<Results>(json);

Console.Write("Your Translation: " + results.Translation + Environment.NewLine +
"Match Accuracy: " + results.MatchPercentage);
internal class Results
{
    public string Translation { get; set; }
    public string OriginText { get; set; }
    public string MatchPercentage { get; set; }
    public string LangFrom { get; set; }
    public string LangTo { get; set; }
}

GetDocumentTraslation(Document Path, isoLanguageFrom, isoLanguageTo)

Languages need to be specified in ISO 639-1 format like below:

using OpenTranslate;

var engine = new OpenTranslateClient();

string json = await engine.GetDocumentTranslation("doc.pdf", "en", "es");

Results results = JsonSerializer.Deserialize<Results>(json);

Console.Write("Your Translation: " + results.Translation + Environment.NewLine +
"Match Accuracy: " + results.MatchPercentage);

internal class Results
{
    public string Translation { get; set; }
    public string OriginText { get; set; }
    public string MatchPercentage { get; set; }
    public string LangFrom { get; set; }
    public string LangTo { get; set; }
}

Roadmap

  • Add OCR image translations.(currently we have started development on this.)
  • Add code and performance optimisation.
  • Remove all usage limits to avoid limiting the free opensource product.

License

MIT

Support

For support, email WebsiterzTech@gmail.com.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0.0.8 560 4/9/2023
1.0.0.7 534 4/7/2023
1.0.0.4 746 11/6/2022
1.0.0.3 653 11/1/2022
1.0.0.2 746 10/27/2022

This is our eighth official beta release.
   We have removed our previous limitations and are in the testing phase.
   We have also added ocr document translations