public function activeLocale()
    {
        $active = $this->getCore()->session()->get(static::ACTIVE_LOCALE_SESSION_KEY);

        if ($active && in_array($active, $this->availableLocales())) {
            return $active;
        }

        return $this->defaultLocale();
    }