You are here

function noderelationships_noderef_get_translation_page_title in Node Relationships 6

Get the translation page title.

See also

translation_nodeapi()

1 call to noderelationships_noderef_get_translation_page_title()
noderelationships_noderef_page in ./noderelationships.pages.inc
Menu callback; Search or Create and reference.

File

./noderelationships.pages.inc, line 421
Implementation of user land pages.

Code

function noderelationships_noderef_get_translation_page_title($reset = FALSE) {
  static $page_title;
  if (!isset($page_title) || $reset) {
    $page_title = FALSE;
    if (isset($_GET['translation']) && isset($_GET['language']) && is_numeric($_GET['translation']) && user_access('translate content')) {
      $translation_source = node_load($_GET['translation']);
      if (!empty($translation_source) && node_access('view', $translation_source)) {
        $language_list = noderelationships_get_localized_language_list();
        if (isset($language_list[$_GET['language']]) && $translation_source->language != $_GET['language']) {
          $page_title = t('Translating @title from @lang-from to @lang-to', array(
            '@title' => $translation_source->title,
            '@lang-from' => $language_list[$translation_source->language],
            '@lang-to' => $language_list[$_GET['language']],
          ));
        }
      }
    }
  }
  return $page_title;
}