You are here

function hook_l10n_servers in Localization update 7

Same name and namespace in other branches
  1. 6 l10n_update.api.php \hook_l10n_servers()

Returns available translation servers and server definitions.

Return value

keyed array of available servers. Example: array('localize.drupal.org' => array( 'name' => 'localize.drupal.org', 'server_url' => 'http://ftp.drupal.org/files/translations/l10n_server.xml', 'update_url' => 'http://ftp.drupal.org/files/translations/%core/%project/%project-%releas..., ), );

1 function implements hook_l10n_servers()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

l10n_update_l10n_servers in ./l10n_update.module
Implements hook_l10n_servers().
1 invocation of hook_l10n_servers()
l10n_update_server in ./l10n_update.module
Get server information, that can come from different sources.

File

./l10n_update.api.php, line 19
API documentation for Localize updater module.

Code

function hook_l10n_servers() {

  // This hook is used to specify the default localization server(s).
  // Additionally server data can be specified on a per project basis in the
  // .info file or using the hook_l10n_update_projects_alter().
  module_load_include('inc', 'l10n_update');
  $server = l10n_update_default_server();
  return array(
    $server['name'] => $server,
  );
}