eZ\Publish\Core\Repository\URLAliasService::matchLanguageCode PHP Method

matchLanguageCode() protected method

protected matchLanguageCode ( array $pathElementData, string $pathElement ) : string | boolean
$pathElementData array
$pathElement string
return string | boolean
    protected function matchLanguageCode(array $pathElementData, $pathElement)
    {
        foreach ($this->sortTranslationsByPrioritizedLanguages($pathElementData['translations']) as $translationData) {
            if (strtolower($pathElement) === strtolower($translationData['text'])) {
                return $translationData['lang'];
            }
        }
        return false;
    }