You are here

function language_negotiation_url_prefixes in Drupal 8

Reads language prefixes and uses the langcode if no prefix is set.

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::config('language.negotiation')->get('url.prefixes') instead.

See also

https://www.drupal.org/node/2912748

File

core/modules/language/language.module, line 278
Add language handling functionality to Drupal.

Code

function language_negotiation_url_prefixes() {
  @trigger_error("language_negotiation_url_prefixes() is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use \\Drupal::config('language.negotiation')->get('url.prefixes') instead. See https://www.drupal.org/node/2912748", E_USER_DEPRECATED);
  return \Drupal::config('language.negotiation')
    ->get('url.prefixes');
}