You are here

function i18n_node_node_view in Internationalization 7

Implements hook_node_view()

File

i18n_node/i18n_node.module, line 260
Internationalization (i18n) module - Node type handling

Code

function i18n_node_node_view($node, $view_mode, $langcode) {
  if (i18n_node_type_enabled($node)) {
    $extra_fields_display_settings = field_extra_fields_get_display('node', $node->type, $view_mode);
    if (isset($extra_fields_display_settings['language']['visible']) && $extra_fields_display_settings['language']['visible']) {
      $node->content['language'] = array(
        '#type' => 'item',
        '#title' => t('Language'),
        '#markup' => i18n_language_name($node->language),
      );
    }
  }
}