public static function EntityTranslationDefaultHandler::languageSwitchLinks in Entity Translation 7
Returns the localized links for the given path.
3 calls to EntityTranslationDefaultHandler::languageSwitchLinks()
- EntityTranslationDefaultHandler::localTasksAlter in includes/
translation.handler.inc - entity_translation_node_view in ./
entity_translation.node.inc - Implements hook_node_view().
- entity_translation_overview in ./
entity_translation.admin.inc - Translations overview page callback.
File
- includes/
translation.handler.inc, line 506 - Default translation handler for the translation module.
Class
- EntityTranslationDefaultHandler
- Class implementing the default entity translation behaviours.
Code
public static function languageSwitchLinks($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;
}