Lionbridge Content API C# SDK

The easiest way to add Lionbridge translation services
to your C# application.


Add The SDK

You can add the Lionbridge.onDemand.Client package using Visual Studio's Add NuGet Package... entry found
under the Project menu. You can also manually add the following to your packages.config:
<packages>
  <package id="Lionbridge.onDemand.Client" version="1.1.0" targetFramework="net45" />
</packages>

Connect to the Content API

Connecting to the Content API is easy once you've acquired your API keys:
IContentAPI api = new ContentAPI(
  keyId: "ACCESS_KEY_ID",
  secretKey: "SECRET_KEY",
  endpoint: new Uri("ENDPOINT_URL"),
  defaultCurrency: "DEFAULT_CURRENCY"
);

Upload Files

You can easily add files using the AddFiles method, providing the encoding and path to the file:
File file = api.AddFile("en-us", "packages.config");

Create Project Options

The ProjectOptions class gives you control over things like source language and target languages:
ProjectOptions options = new ProjectOptions(
  "en-us",
  new string[] { "fr-fr", "de-de" }
);

Retrieve the Service you want to Use

You can use the ListServices method to retrieve all the available services or you can use GetService to retrieve it by ID:
Service service = api.GetService(146);

Create A Project

To create a project just give it a name, the service you want to use, your preferred translation options and a list of files you previously uploaded:
Project project = api.AddProject(
  "My C# Project",
  service,
  new File[] { file },
  options
);

Generate A Quote

You can then generate a quote using any number of projects you've created and ProjectQuoteOptions:
Quote quote = api.GenerateQuote(
  new Project[] { project },
  new ProjectQuoteOptions("USD")
);

Authorize the Quote

Once the quote is ready you can use the SDK to authorize it:
QuoteAuthorization quoteAuthorization = quote.Authorize();

That's Not All...

Many more things are possible - just check the SDK Docs for things like:

Add Files By URL

Got a big file? The content API can retrieve very large files from publicly accessible HTTP and FTP sites .

List of Locales and Services

Not sure what languages and services are available for your users? We have APIs that list these options so that your users can select them.

List of Projects and Quotes

List what work has been sent to Lionbridge and check on status.

Get Detailed Information

Get detailed information about quotes, projects, and files that were created in the API.

Download Deliverables

Download deliverables from completed projects.

Reject and Cancel Quotes

Unclutter your shopping cart by rejecting unpurchased quotes. Request cancellation of mistakenly purchased quotes.

SDK Docs

If you have more questions beyond this knowledgebase kindly check