DeepL 0.4.3

Suggested Alternatives

DeepL.net

Additional Details

This unofficial DeepL implementation has been deprecated in favor of the official DeepL.net package.

dotnet add package DeepL --version 0.4.3
NuGet\Install-Package DeepL -Version 0.4.3
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="DeepL" Version="0.4.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DeepL --version 0.4.3
#r "nuget: DeepL, 0.4.3"
#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 DeepL as a Cake Addin
#addin nuget:?package=DeepL&version=0.4.3

// Install DeepL as a Cake Tool
#tool nuget:?package=DeepL&version=0.4.3

DeepL.NET

DeepL.NET Logo

License: MIT Nuget Package Nuget Downloads

⚠️ DEPRECATION NOTICE For some time now, an official .NET binding for DeepL has been available. This unofficial .NET binding has only been created, because, at the time, there was no official .NET binding. Therefore, this .NET binding will be deprecated soon. This means that this project will only receive security updates and bug fixes, but no new features will be added from now on. Also, the DeepLClient class was made obsolete and a compiler warning will be issued, when you use it. On February 28, 2023, the project will seize to receive any updates, the repository will be put into archived mode, and the accompanying NuGet package will be deprecated. To help you with the transition, please refer to the migration guide

An unofficial, fully-featured .NET client for the DeepL translation service. DeepL is a commercial translation service based on deep learning. This API client only supports v2 of the API as v1 has been deprecated for new DeepL API plans available from October 2018.

Features

  • .NET Core and .NET Framework compatible
  • Completely asynchronous (using the async-await pattern)
  • Covers the complete surface area of the DeepL API
  • Translate text (including text with XML markup)
  • Translate documents (Word, PowerPoint, HTML, and raw text documents)

Getting Started

To get started you have to add the package reference to your project:

Install-Package DeepL -Version 0.4.3 # Package Manager
dotnet add package DeepL --version 0.4.3 # .NET CLI
paket add DeepL --version 0.4.3 # Paket CLI

or manually add a reference to your project file:

<PackageReference Include="DeepL" Version="0.4.3" />

Then you can start translating texts:

using DeepL;

namespace Application
{
    public class Program
    {
        public static async Task Main(string[] arguments)
        {
            using (DeepLClient client = new DeepLClient("<authentication key>", useFreeApi: false))
            {
                try
                {
                    Translation translation = await client.TranslateAsync(
                        "This is a test sentence.",
                        Language.German
                    );
                    Console.WriteLine(translation.DetectedSourceLanguage);
                    Console.WriteLine(translation.Text);
                }
                catch (DeepLException exception)
                {
                    Console.WriteLine($"An error occurred: {exception.Message}");
                }
            }
        }
    }
}

For a more complex example, please refer to the sample application, which is a fully-featured command line tool that demonstrates the usage of all DeepL.NET features. For a complete overview of DeepL.NET, please refer to the documentation.

Developing

If you want to develop the project further, please install the .NET Core SDK and, if necessary, Git. After that you are ready to clone the repository and build the project:

git clone https://github.com/lecode-official/deepl-dotnet.git
cd deepl-dotnet
dotnet build

Contributing

If you'd like to contribute, there are multiple ways you can help out. If you find a bug or have a feature request, please feel free to open an issue on GitHub. If you want to contribute code, please fork the repository and use a feature branch. Pull requests are always welcome. Before forking, please open an issue where you describe what you want to do. This helps to align your ideas with mine and may prevent you from doing work, that I am already planning on doing. If you have contributed to the project, please add yourself to the contributors list (CONTRIBUTORS.md). Also, if necessary, update the documentation and the DeepL CLI. To help speed up the merging of your pull request, please comment and document your code extensively and try to emulate the coding style of the project.

Releasing the NuGet Package

Before a releasing a new version to NuGet, do the following things:

  • Update the changelog by adding a list of changes that were made since the last release in CHANGELOG.md
  • Add all contributors to the CONTRIBUTORS.md and add the people that have contributed to the current release to the changelog
  • Update the version number in the following files
    • README.md
    • documentation/documentation.md
    • DeepL.csproj
    • DeepL.Sample.csproj
  • Add the the list of changes to the <PackageReleaseNotes> in DeepL.csproj (no Markdown allowed, do not indent)
  • Do not forget to build the NuGet package in release configuration: dotnet pack --configuration Release
  • Upload both the .nupkg and the .snupkg to NuGet

License

The code in this project is licensed under MIT license. For more information see the license file.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
0.4.3 3,210 11/28/2022
0.4.2 4,029 10/6/2022
0.4.1 1,019 8/18/2022
0.4.0 12,760 1/28/2022
0.3.0 34,143 5/11/2021
0.2.1 3,809 4/13/2021
0.2.0 586 3/23/2021
0.1.0 6,268 5/16/2020

- Added a deprecation notice to the read me, as the project will soon be discontinued
- Added a migration guide, to help existing users to easily migrate to the official DeepL .NET binding
- Made the DeepLClient class obsolete, so that users will receive a compiler warning, concerning the deprecation of DeepL.NET