Lokalise APIv2 Ruby SDK

Ruby interface for the Lokalise APIv2 that represents returned data as Ruby objects.

View the Project on GitHub lokalise/ruby-lokalise-api

Lokalise APIv2 Ruby interface

Install the gem:

gem install ruby-lokalise-api

Obtain Lokalise API token in your personal profile, initialize and use the client:

require 'ruby-lokalise-api'

@client = Lokalise.client 'YOUR_TOKEN_HERE'

project = @client.project '123.abc'

process = @client.upload_file project_id,
                              data: 'Base-64 encoded data... ZnI6DQogI...',
                              filename: 'my_file.yml',
                              lang_iso: 'en'


Looking for a Rails integration? Try the lokalise_rails gem. Also you can use a lokalise_manager gem which allows to exchange translation files between Lokalise and any Ruby script.

You can also check this repo containing some usage examples and this blog post with explanations.


Additional info