Lengoo.SDK
3.0.1
dotnet add package Lengoo.SDK --version 3.0.1
NuGet\Install-Package Lengoo.SDK -Version 3.0.1
<PackageReference Include="Lengoo.SDK" Version="3.0.1" />
paket add Lengoo.SDK --version 3.0.1
#r "nuget: Lengoo.SDK, 3.0.1"
// 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
- Built-in and configurable retry policies.
- Individual service classes that mimic single API calls.
- Manager class for the Connect service, further easing the process of working with the API.
REST APIs
- Connect API: https://connect.lengoo.com/docs
- Translate API: https://translate-api.lengoo.com/docs
Development environment
- .NET Standard 2.0
- 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 | Versions 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. |
-
.NETStandard 2.0
- Polly (>= 7.2.4)
- RestSharp (>= 110.2.0)
- SIL.ReleaseTasks (>= 2.5.0)
- System.IdentityModel.Tokens.Jwt (>= 6.25.0)
- System.Text.Json (>= 7.0.2)
- Xliff.OM.NetStandard (>= 1.0.2)
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.
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