function locale_translation_default_translation_server

Same name in other branches
  1. 9 core/modules/locale/locale.compare.inc \locale_translation_default_translation_server()
  2. 8.9.x core/modules/locale/locale.compare.inc \locale_translation_default_translation_server()
  3. 11.x core/modules/locale/locale.compare.inc \locale_translation_default_translation_server()

Retrieve data for default server.

Return value

array Array of server parameters:

  • "pattern": URI containing po file pattern.
1 call to locale_translation_default_translation_server()
locale_translation_build_projects in core/modules/locale/locale.compare.inc
Builds list of projects and stores the result in the database.

File

core/modules/locale/locale.compare.inc, line 160

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 [
        'pattern' => $pattern,
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.