You are here

function taxonomy_facets_prepend_language_prefix in Taxonomy Facets 7.2

Some sites will opt out to not prepend language prefix to the url produced with this module https://www.drupal.org/node/2379617

Return value

string language alias or empty string

1 call to taxonomy_facets_prepend_language_prefix()
taxonomy_facets_build_url_alias in ./taxonomy_facets.module
Build a URL to be used in the menu item.

File

./taxonomy_facets.module, line 659
Taxo Faceted Navigation module code.

Code

function taxonomy_facets_prepend_language_prefix() {
  global $language;
  $alias = '';

  // Prepend language prefix to the path, but only if user did not
  // choose to ignore it in the prefrences.
  $lang_ignore = variable_get('taxonomy_facets_ignore_language_prefix', FALSE);
  if ($language->prefix != NULL && $lang_ignore == NULL) {
    $alias = '/' . $language->prefix;
  }
  return $alias;
}