function locale_translation_default_translation_server
Same name and namespace in other branches
- 10 core/modules/locale/locale.compare.inc \locale_translation_default_translation_server()
- 11.x core/modules/locale/locale.compare.inc \locale_translation_default_translation_server()
- 9 core/modules/locale/locale.compare.inc \locale_translation_default_translation_server()
- 8.9.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.
Deprecated
in drupal:11.4.0 and is removed from drupal:13.0.0. There is not replacement.
See also
https://www.drupal.org/node/3037033
File
-
core/
modules/ locale/ locale.compare.inc, line 147
Code
function locale_translation_default_translation_server() {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3037033', E_USER_DEPRECATED);
$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.
return [
'pattern' => $pattern ?: \Drupal::TRANSLATION_DEFAULT_SERVER_PATTERN,
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.