hook_locale_translation_projects_alter(&$projects)
Alter the list of projects to be updated by locale's interface translation.
Locale module attempts to update the translation of those modules returned by \Drupal\Update\UpdateManager::getProjects(). Using this hook, the data returned by \Drupal\Update\UpdateManager::getProjects() can be altered or extended.
Modules or distributions that use a dedicated translation server should use this hook to specify the interface translation server pattern, or to add additional custom/non-Drupal.org modules to the list of modules known to locale.
The following tokens are available for the server pattern:
array $projects: Project data as returned by \Drupal\Update\UpdateManager::getProjects().
locale_translation_project_list()
function hook_locale_translation_projects_alter(&$projects) { // The translations are located at a custom translation sever. $projects['existing_project'] = array( 'info' => array( 'interface translation server pattern' => 'http://example.com/files/translations/%core/%project/%project-%version.%language.po', ), ); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.api.php/function/hook_locale_translation_projects_alter/8.1.x