RainLab\Translate\Classes\Translator::getLocale PHP Method

getLocale() public method

Returns the active locale set by this instance.
public getLocale ( boolean $fromSession = false ) : string
$fromSession boolean Look in the session.
return string
    public function getLocale($fromSession = false)
    {
        if ($fromSession && ($locale = $this->getSessionLocale())) {
            return $locale;
        }
        return $this->activeLocale;
    }