getLanguageCode() public method

public getLanguageCode ( )
Beispiel #1
0
 public function getLanguageCode()
 {
     if (!$this->document) {
         return $this->locale;
     }
     // return original locale for shadow or ghost pages
     if ($this->getIsShadow() || $this->getType() && $this->getType()->getName() === 'ghost') {
         return $this->inspector->getOriginalLocale($this->getDocument());
     }
     return parent::getLanguageCode();
 }