function Notifications_Subscription::get_language in Notifications 6.4
Same name and namespace in other branches
- 7 notifications.subscription.inc \Notifications_Subscription::get_language()
Get language object
File
- includes/
notifications_subscription.class.inc, line 654 - Drupal Notifications Framework - Default class file
Class
- Notifications_Subscription
- Message destination class
Code
function get_language() {
if (!isset($this->_language)) {
if (!empty($this->language) && ($languages = language_list()) && isset($languages[$this->language])) {
$this->_language = $languages[$this->language];
}
else {
$this->_language = user_preferred_language($this
->get_account());
$this->language = $this->_language->language;
}
}
return $this->_language;
}