locale_translation_default_translation_server

locale_translation_default_translation_server()

Retrieve data for default server.

Return value

array Array of server parameters:

  • "server_pattern": URI containing po file pattern.

File

core/modules/locale/locale.compare.inc, line 159
The API for comparing project translation status with available translation.

Code

function locale_translation_default_translation_server() {
  $pattern = \Drupal::config('locale.settings')->get('translation.default_server_pattern');
  // An additional check is required here. During the upgrade process
  // \Drupal::config()->get() returns NULL. We use the defined value as
  // fallback.
  $pattern = $pattern ? $pattern : LOCALE_TRANSLATION_DEFAULT_SERVER_PATTERN;

  return array(
    'pattern' => $pattern,
  );
}
doc_Drupal
2016-10-29 09:24:24
Comments
Leave a Comment

Please login to continue.