You are here

public function HeartbeatStream::getCurrentLanguages in Heartbeat 7

getCurrentLanguages().

Get the current global language.

2 calls to HeartbeatStream::getCurrentLanguages()
HeartbeatStream::createQuery in includes/heartbeatstream.inc
createQuery().
SingleActivity::createQuery in streams/singleactivity.inc
Override the createQuery method.

File

includes/heartbeatstream.inc, line 220
HeartbeatStream object is the object that takes stream configuration to create a stream of activity objects. It is the controlling organ at the pre-query, query and post-query phases.

Class

HeartbeatStream
Abstract class HeartbeatStream This base class has final template methods which are used by the derived concretes. The HeartbeatStream is a state object that is given to the HeartbeatStreamBuilder to set the access to the current request.

Code

public function getCurrentLanguages() {
  global $language;
  $this->language = $language->language;
  $languages = array(
    'und' => 'und',
  );

  // TODO check if we are going to use no languages at all at log time
  $languages[str_replace('-', '_', $language->language)] = $language->language;
  return $languages;
}