detectLanguage() public method

Detect the current system/user language or false.
public detectLanguage ( ) : string
return string The language code (eg "en") or false if not set
示例#1
0
 public function testSetLanguageFromGetParameter()
 {
     _elgg_services()->input->set('hl', 'es');
     $this->assertEquals('es', $this->translator->detectLanguage());
     _elgg_services()->input->set('hl', null);
 }