Skip to content

Instantly share code, notes, and snippets.

@rpayanm
Created February 4, 2020 14:36
Show Gist options
  • Save rpayanm/4adae37399f66bfa9b114490f172a9cd to your computer and use it in GitHub Desktop.
Save rpayanm/4adae37399f66bfa9b114490f172a9cd to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_locale_translation_projects_alter().
*/
function MODULENAME_locale_translation_projects_alter(&$projects) {
$path_module = drupal_get_path('module', 'MODULENAME');
$path_translation = $path_module . '/translations/%language.po';
$projects['MODULENAME'] = [
'info' => [
'interface translation server pattern' => $path_translation,
],
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment