Lengoo.SDK 3.0.1

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

// Install Lengoo.SDK as a Cake Tool
#tool nuget:?package=Lengoo.SDK&version=3.0.1                

Lengoo SDK

Overview

The Lengoo SDK is a tool designed for .NET developers to simplify the use of Lengoo's services. It currently supports Lengoo's Connect and Translate REST APIs. This SDK allows for rapid integration of both human and machine translation capabilities into your application.

Features

  1. Built-in and configurable retry policies.
  2. Individual service classes that mimic single API calls.
  3. Manager class for the Connect service, further easing the process of working with the API.

REST APIs

  1. Connect API: https://connect.lengoo.com/docs
  2. Translate API: https://translate-api.lengoo.com/docs

Development environment

  1. .NET Standard 2.0
  2. Visual Studio / Rider

SDK Usage Examples

Human Translation

ConnectService
using Lengoo.SDK.Client.Connect;
using Lengoo.SDK.Core.Connect.Settings;

var configuration = new Configuration(....)
var connectService = new ConnectService(configuration);
ConnectManager
using Lengoo.SDK.Client.Connect;
using Lengoo.SDK.Core.Connect.Settings;

var configuration = new Configuration(....)
var connectManager = new ConnectManager(configuration);

Machine Translation

using Lengoo.SDK.Client.Translate;
using Lengoo.SDK.Core.Translate.Settings;

var configuration = new Configuration(....)
var translationService = new TranslationService(configuration);

Retry policy configuration

All the services come with a preconfigured retry policy, set with a retry count of 5 and a retry duration of 500ms. If you wish to modify these settings, you can specify your preferences in the configuration.

using Lengoo.SDK.Client.Translate;
using Lengoo.SDK.Core.Translate.Settings;

var configuration = new Configuration(
    clientId,
    clientSecret,
    retryCount: 5,
    retryDuration: 500
);

var translationService = new TranslationService(configuration);

Custom Http Client

Lengoo.SDK allows to override HTTP client. To do so, you need to implement the IRestClientFactory interface, which as a result returns the RestSharp client.

public interface IRestClientFactory
{
    IRestClient Build(RestClientOptions restClientOptions);
}

Then you need to pass your implementation to the configuration.

using Lengoo.SDK.Client.Translate;
using Lengoo.SDK.Core.Translate.Settings;

var configuration = new Configuration(
    clientId,
    clientSecret,
    clientFactory: new MyCustomRestClientFactory()
);

var translationService = new TranslationService(configuration);
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 (2)

Showing the top 2 NuGet packages that depend on Lengoo.SDK:

Package Downloads
Lengoo.Connector.Episerver

Plugin for EPiServer/Optimizely for multilanguage content translation

Lengoo.Connector.Optimizely

Plugin for Optimizely for multilanguage content translation

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.1 148 12/4/2023
3.0.0 146 11/8/2023
2.3.5 734 8/14/2023
2.3.4 206 8/10/2023
2.3.3 1,411 6/27/2023
2.3.2 1,277 4/26/2023
2.3.1 1,886 12/1/2022
2.3.0 617 11/11/2022
2.2.0 763 10/12/2022
2.1.2 1,632 7/15/2022
2.1.1 813 7/5/2022
2.1.0 913 4/20/2022

Changes since version 3.0.0

Features:
* Add support for new Language codes. (ISO 639-1 for language, optionally ISO 15924 for script, and ISO 3166-1 alpha-2 for country)
* Update Readme