public function getLanguageLocale($separator = '-')
    {
        if (!is_array($this->languages)) {
            LanguageDetector::detect($this, $this->getAcceptLanguage());
        }

        $userLanguage = $this->getLanguage();
        foreach ($this->languages as $language) {
            if (strlen($language) === 5 && strpos($language, $userLanguage) === 0) {
                $locale = substr($language, -2);
                break;
            }
        }

        if (!empty($locale)) {
            return $userLanguage . $separator . strtoupper($locale);
        } else {
            return $userLanguage;
        }
    }