private function set_notification_language($user) {
        global $CFG;

        // Copied from current_language().
        if (!empty($user->lang)) {
            $lang = $user->lang;
        } else if (isset($CFG->lang)) {
            $lang = $CFG->lang;
        } else {
            $lang = 'en';
        }
        force_current_language($lang);
    }
private function set_notification_language($user) {
        global $CFG;

        // Copied from current_language().
        if (!empty($user->lang)) {
            $lang = $user->lang;
        } else if (isset($CFG->lang)) {
            $lang = $CFG->lang;
        } else {
            $lang = 'en';
        }
        force_current_language($lang);
    }
private function set_notification_language ( $ user ) { global $ CFG ; // Copied from current_language(). if ( ! empty ( $ user -> lang ) ) { $ lang = $ user -> lang ; } else if ( isset ( $ CFG -> lang ) ) { $ lang = $ CFG -> lang ; } else { $ lang = 'en' ; } force_current_language ( $ lang ) ; }
Sets the session language to the language used by the notification receiver.

@param  \stdClass $user The user who will receive the message
@return null
Sets the session language to the language used by the notification receiver .