function _translation_entity_get_switch_links

Returns the localized links for the given path.

@returns A renderable array of language switch links.

Parameters

string $path: The path for which language switch links should be provided.

1 call to _translation_entity_get_switch_links()
translation_entity_overview in drupal/core/modules/translation_entity/translation_entity.pages.inc
Translations overview page callback.

File

drupal/core/modules/translation_entity/translation_entity.pages.inc, line 167
The entity translation user interface.

Code

function _translation_entity_get_switch_links($path) {
  $links = language_negotiation_get_switch_links(Language::TYPE_CONTENT, $path);
  if (empty($links)) {

    // If content language is set up to fall back to the interface language,
    // then there will be no switch links for Language::TYPE_CONTENT, ergo we
    // also need to use interface switch links.
    $links = language_negotiation_get_switch_links(Language::TYPE_INTERFACE, $path);
  }
  return $links;
}