Alter the results returned by "Display a summary" for the Addressfield module When I set contextual filters in a view for Content: my field: country and Content: my field: administrative area (state/province) and select "Display a summary" for "When the filter value is not available", it returns a list of country/administrative area codes (e.g. "JP"), not the names of the country/administrative area (e.g. "Japan").

How can I show the names of the countries/administrative areas instead of the codes?
Here is an alternative to @Kenny and @Bearden solution, using template preprocess instead of overriding the template. Not only it makes for a more readable solution, you can reuse it for other views. It should also work for list summaries, just remove _unformatted from the function name.

/**
 * Implements hook_preprocess_views_view_summary_unformatted().
 */
function MYTHEME_preprocess_views_view_summary_unformatted($variables) {
  if ($variables['view']-&gt;name == MYVIEW) {
    // Necessary for country_get_list().
    include_once DRUPAL_ROOT . '/includes/locale.inc';
    $countries = country_get_list();

    // Looping through the row keys for performance reasons.
    foreach (array_keys($variables['rows']) as $rowid) {
      $countryid = $variables['rows'][$rowid]-&gt;link;
      if (!empty($countries[$countryid])) {
        $variables['rows'][$rowid]-&gt;link = $countries[$countryid];
      }
    }
  }
}