Connectors / Service / Lokalise

All-in-one software localisation and translation management platform. (updated: 1615392614331)

Lokalise

All-in-one software localization and translation management platform.

Overview

Lokalise is an app localization and translation platform designed for the use of project managers with integrated tools for developers and other stakeholders. It enables you to automate the translation and localization workflow of your web and mobile applications, games, and software.

API INFO: The Base URL used for the lokalise connector is https://api.lokalise.com/api2. More information can be found on their main API documentation (v2.0) site.

Below is an example of a way in which you could potentially use the Lokalise connector, to download specific project files filtered by name.

The steps will be as follows:

  1. Setup using a manual trigger and list the project files filtered by name.

  2. Add the Loop collection connector to iterate over each file.

  3. Download each file individually.

Your completed workflow should look similar to this:

lokalise-complete-workflow

1 - Setup Trigger & List Project Files

Select the manual trigger from the trigger options available.

lokalise-manual-trigger

From the connectors panel on the left, add a Lokalise connector to your workflow. Set the operation to 'List project files'.

The 'Project Id' field contains all your available projects. You can select a 'Project ID' of your choice from the available dropdown options.

Using the 'Filter Filename' field, you can filter the list of files based on a specific filename. You can provide any file name as per your choice. In our example, the value we have assigned is example.

Please note that the 'Limit' and 'Page' fields are already pre-filled for you, so you need not worry about it at this stage.

lokalise-step-1

Feel free to re-name your steps as you go along to make things clearer for yourself and other users. The operation names themselves often suffice.

Now, when the workflow is run, it will retrieve all the files that belong to the selected project and have example word as a part of the filename.

2 - Add a loop collection

Next, search for the Loop collection connector within your connector panel, and drag it into your workflow as your next step. Set your operations to 'Loop list'.

The Loop Collection connector allows you to iterate through a list of results. In this example, we will use it to iterate through the data found within the previous Lokalise connector step.

In order to specify the list, you want to loop through, start by using the list mapping icon (found next to the list input field, within the properties panel) to generate the connector-snake.

While hovering over the 'List Project Files' step (with the tail end of the connector-snake), select files from the list of output properties displayed. This will auto-populate a jsonpath within your list input field and update the type selector to jsonpath.

For more clarification on the pathways you have available, open the Debug panel to view your step's Input and Output.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our Intro page and Data Guide for more details.

CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

lokalise-step-2-loop

This will enable us to iterate over the list of files, and perform operations for each one, during each loop cycle.

3 - Download Files

The last step is to drag a Lokalise connector inside of the Loop Collection step itself. Set the operation to 'Download files'.

As you can see, this operation requires the ID of the project from which you want to download files and the format of the files you want to download.

Since the files, we are looping through belong to the 'Example project' as selected in the first(List Project Files) step. At this stage, we will choose the same project name as an input for the 'Project ID' field.

For the 'Format' field, provide json as an input as all the selected files are of the JSON format.

PLEASE NOTE: for the 'Download files' operation selecting the format type corresponding to the format of the file we want to download is crucial, otherwise the API will send an error. You can find more info about the supported file formats here

lokalise-step-3-part-1

Scrolling down the properties panel, you will find the 'filter filenames' field. Using the connector-snake, find the jsonpath for the 'Filename' field from the previous step. It should appear similar to $.steps.loop-1.value.filename.

lokalise-step-3-part-2

Now when this workflow is run, you will receive URLs for downloading every single file. You will also be able to view the file's details when you click through your debug panel and expand the output.

lokalise-step-3-debug

BEST PRACTICES: Whenever you do decide to create your own workflow, please make sure you take a look at our managing data best practices guide.

All Operations

Latest version:

1.0

Upload file

Queues a localization file for import.

Download files

Exports project files as a .zip bundle.

List other projects DDL

List project custom translation statuses

Lists all custom translation statuses in the project.

List project custom translation statuses DDL

List project files

Lists project files and associated key count.

List project files by format DDL

List projects

Retrieves a list of all available projects.

List projects DDL

List teams

Lists all teams available to the user.

List teams DDL

Raw HTTP request (advanced)

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.