You are here

function i18n_node_nid2autocomplete in Internationalization 7

Same name and namespace in other branches
  1. 6 i18n.pages.inc \i18n_node_nid2autocomplete()

Generates 'title [nid:$nid]' for the autocomplete field

2 calls to i18n_node_nid2autocomplete()
I18nNodeTestCase::testAddContentToTranslationSet in i18n_node/i18n_node.test
Tests for adding content to an existing translation set.
i18n_node_select_translation in i18n_node/i18n_node.pages.inc
Form to select existing nodes as translation

File

i18n_node/i18n_node.pages.inc, line 249
User page callbacks for the translation module.

Code

function i18n_node_nid2autocomplete($nid) {
  if ($node = node_load($nid)) {
    return $node->title . ' [nid:' . $nid . ']';
  }
  else {
    return t('Not found');
  }
}