Rails Sample Application

The best way to start using the SDK is to run a sample application that comes bundled with this SDK.

Before Running the Sample Application

Make sure you have a Translation Exchange account, and have created a project in your dashboard.

https://github.com/translationexchange/tml-rails-samples-foody

$ git clone https://github.com/translationexchange/tml-rails-samples-foody.git
$ cd tml-rails-samples-foody
$ bundle install

Update your key in the following file: config/initializers/tml.rb

config.application = {  
  :key => "YOUR_APPLICATION_KEY"
}

Now you can start the application by running:

$ bundle exec rails s

This will start the Foody sample application on port 3000. Open your browser and point to: http://localhost:3000

We also offer a fully interactive document in the Rails SDK itself. It is located under the Rails SDK source code.

https://github.com/translationexchange/tml-rails

To install and use the sample, follow these steps:

$ git clone https://github.com/tml/tml_rails_clientsdk.git
$ cd tml_rails_clientsdk/spec/dummy
$ bundle install
$ bundle exec rails s

This will start the dummy application on port 3000. Open your browser and point to: http://localhost:3000