Skip to content

cryovat/gengo-dotnet

Repository files navigation

Winterday.External.Gengo

A .NET library for interfacing with the Gengo API for translation with decent unit test coverage.

  • License: MIT
  • Contributors: See list
  • Stability: Provisional
  • Dependencies: Newtonsoft.Json
  • Supported platforms: .NET 4.5 (Mono to come)
  • Gengo API version: V2

Nuget

The library is finally available on NuGet! Install through Manage Nuget Packages in Visual Studio or the following command in the package manger console:

PM> Install-Package gengo-dotnet

Sample usage

// Client initialization
var client = new GengoClient(
    Settings.Default.PrivateKey,
    Settings.Default.PublicKey,
    ClientMode.Production);
        
// Submit a text for translation
var confirmation = await _client.Jobs.Submit(
    true,  // Require same translator on all jobs
    false, // Do not allow translator change
    new Job()
    {
        Slug = "Sample job",
        Body = "My hovercraft is full of eels",
        SourceLanguage = "en",
        TargetLanguage = "ja",
    });
    
// Submit a file for translation
var confirmation = await _client.Service.GetQuoteForFiles(
    new FileJob(@"c:\files\an_anthology_of_eels.txt")
    {
        Slug = "Sample job",
        SourceLanguage = "en",
        TargetLanguage = "ja",
    });

// Get reviewable jobs
var reviewable = await _client.Jobs.GetRecentJobs(
    status: TranslationStatus.Reviewable,
    afterDateTime: lastMonday,
    maxCount: 40);

Supported methods

See http://developers.gengo.com/ for API overview/documentation

Todo

  • Refactor out some redundancy
  • Inclue StyleCop in build process and get rid of any errors

About

Unofficial .NET library for Gengo API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published