function MenuLeaf::getLanguagePrefix in Taxonomy Facets 8
1 call to MenuLeaf::getLanguagePrefix()
File
- src/
MenuLeaf.php, line 116
Class
Namespace
Drupal\taxonomy_facetsCode
function getLanguagePrefix() {
if ($prefixes = \Drupal::config('language.negotiation')
->get('url.prefixes')) {
$language = \Drupal::languageManager()
->getCurrentLanguage()
->getId();
if ($prefixes[$language]) {
return "/" . $prefixes[$language];
}
}
// @TODO add case when using different domains for language negotiation.
// kint($config->get('url.domains'));
return null;
}