You are here

function Notifications_Subscription::get_language in Notifications 7

Same name and namespace in other branches
  1. 6.4 includes/notifications_subscription.class.inc \Notifications_Subscription::get_language()

Get language object

File

./notifications.subscription.inc, line 1329
Drupal Notifications Framework - Default class file

Class

Notifications_Subscription
Common base for subscription type and subscription instance

Code

function get_language() {
  if (!empty($this->language) && ($languages = language_list()) && isset($languages[$this->language])) {
    return $languages[$this->language];
  }
  else {
    return user_preferred_language($this
      ->get_account());
  }
}