Upgrading Translation Exchange SDKs to the latest release

In this post we will walk you through the steps to upgrade your application to use the most recent Translation Exchange SDKs for Rails, Node.JS and PHP.

Choose the SDK you are using and follow the instructions below.

If you are integrating Translation Exchange SDK for the first time please follow our detailed instructions for Ruby on Rails, Node JS or PHP.

In all previous versions of the SDKs, project token was the only required parameter. Starting with the current SDK version, we are adding project key as an additional required parameter. This change is made to provide additional security features. Your new project key is now available in the integration section of Translation Exchange Dashboard. Your project token stays the same and you do not need to change it.

This SDK upgrade includes improved stability, security and numerous bug fixes. For more information please refer to our documentation section.

Ruby on Rails

Ruby on Rails SDK is distributed using rubygems.org and is available here:

tml-rails

The latest version is 5.0.1 as of September 2015.

Update your Gemfile with the following information:

In your tml.rb initializer file, please add the following information:

Then open your application directory in a terminal and run the following command:

This will effectively update the tml-rails gem version and its dependencies.

Node.JS

Node.JS SDK is distributed using npmjs.com and is available here:

tml-express

The latest version is 0.3.3 as of September 2015.

Update your package.json with the following information:

For Node JS, we updated the tml.init function to pass the additional project key parameter. Please update your app.js to be similar to the following code snippet:

Under your application directory perform NPM update:

You should see in above command output tml-express and it’s dependency tml-js were upgraded to latest version.

PHP

PHP SDK is distributed using packagist.org and is available here:

trasnlationexchange/tml

The latest version is 3.0.1 as of September 2015.

Update your composer.json file with the following information:

For PHP, please follow code snippet to enter your Key and Token

Please perform composer update under your application folder: