Getting Started

Last updated on
9 August 2019

The Loco Translate module provides a normalised way to collect & gather internationalisation assets & translations into & from Loco.

Getting Started

We highly recommend you to install the module using composer

$ composer require drupal/loco_translate

You can also install it using the drush or drupal console cli.

$ drush dl loco_translate
$ drupal module:install loco_translate

Don't forget to enable the module once installed.
Enable them as usual i.e. sites/all/modules.

See also the Project page on Drupal.org.

Dependencies

This module relies on Loco API & the Loco PHP SDK.

We highly recommend you to install the SDK using composer

$ composer require loco/loco:^2.0

Setup

The only configurations you have fill is to fullfill your Loco API Keys into Drupal.

See the official Loco documentation to localise those keys.

Once your API keys found, you will have to setup them into your Drupal installation, you have to choice here:

  • Setup the API Keys in your settings.php file 

Or

Setup API Keys via settings.php

/**
 * Loco Translate Export Key.
 *
 * @var string
*/
$config['loco_translate.settings']['api']['readonly_key'] = 'YOUR-KEY-HERE';

/**
 * Loco Translate Full Access Key.
 *
 * @var string
*/
$config['loco_translate.settings']['api']['fullaccess_key'] = 'YOUR-KEY-HERE';

Setup API Keys via the settings form

  1. Reach the Loco Translate settings form (/admin/config/regional/loco_translate/settings),
  2. Fill both file named Export key and Full Access key,
  3. Save your new settings and optionally export them.

Help improve this page

Page status: No known problems

You can: