You are here

public function views_handler_field_node_language::render in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/translation/views_handler_field_node_language.inc \views_handler_field_node_language::render()
  2. 6.2 modules/translation/views_handler_field_node_language.inc \views_handler_field_node_language::render()

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field_node::render

File

modules/locale/views_handler_field_node_language.inc, line 41
Contains .

Class

views_handler_field_node_language
Field handler to translate a language into its readable form.

Code

public function render($values) {
  $languages = views_language_list(empty($this->options['native_language']) ? 'name' : 'native');
  $value = $this
    ->get_value($values);
  $value = isset($languages[$value]) ? $languages[$value] : '';
  return $this
    ->render_link($value, $values);
}