2 // $Id: views_handler_argument_locale_language.inc,v 1.1 2009/02/20 23:02:09 merlinofchaos Exp $
5 * Argument handler to accept a language.
7 class views_handler_argument_locale_language extends views_handler_argument {
9 parent::construct('language');
13 * Override the behavior of summary_name(). Get the user friendly version
16 function summary_name($data) {
17 return $this->locale_language($data->{$this->name_alias});
21 * Override the behavior of title(). Get the user friendly version
25 return $this->locale_language($this->argument);
28 function locale_language($langcode) {
29 $languages = locale_language_list();
30 return isset($languages[$langcode]) ? $languages[$langcode] : t('Unknown language');