src/mako/http/Request.php
protected function stripLocaleSegment(array $languages, string $path): string
	{
		foreach($languages as $key => $language)
		{
			if($path === '/' . $key || strpos($path, '/' . $key . '/') === 0)
			{
				$this->language = $language;

				$this->languagePrefix = $key;

				$path = '/' . ltrim(mb_substr($path, (mb_strlen($key) + 1)), '/');

				break;
			}
		}

		return $path;
	}
protected function stripLocaleSegment(array $languages, string $path): string
	{
		foreach($languages as $key => $language)
		{
			if($path === '/' . $key || strpos($path, '/' . $key . '/') === 0)
			{
				$this->language = $language;

				$this->languagePrefix = $key;

				$path = '/' . ltrim(mb_substr($path, (mb_strlen($key) + 1)), '/');

				break;
			}
		}

		return $path;
	}
protected function stripLocaleSegment ( array $ languages , string $ path ) : string { foreach ( $ languages as $ key => $ language ) { if ( $ path === '/' . $ key || strpos ( $ path , '/' . $ key . '/' ) === 0 ) { $ this -> language = $ language ; $ this -> languagePrefix = $ key ; $ path = '/' . ltrim ( mb_substr ( $ path , ( mb_strlen ( $ key ) + 1 ) ) , '/' ) ; break ; } } return $ path ; }
Strips the locale segment from the path.

@param  array  $languages Locale segments
@param  string $path      Path
@return string
Strips the locale segment from the path .