public function getUriLocale($uri)
    {
        $parts = explode('/', $uri);
        $locale = $parts[1];

        if (count($parts) < 2 || ! in_array($locale, $this->getLocales())) {
            return;
        }

        return $locale;
    }