Getting Started
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
- Fill the API Key Form in the Drupal administration (/admin/config/regional/loco_translate/settings)
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
- Reach the Loco Translate settings form (/admin/config/regional/loco_translate/settings),
- Fill both file named Export key and Full Access key,
- Save your new settings and optionally export them.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion