private function locale2handle (string $locale): string
	{
		if (
			!preg_match('/^' . HandleValidator::$handlePattern . '$/', $locale) ||
			in_array(strtolower($locale), HandleValidator::$baseReservedWords, true)
		) {
			$localeParts = array_filter(preg_split('/[^a-zA-Z0-9]/', $locale));

			return $localeParts ? '_' . implode('_', $localeParts) : '';
		}

		return $locale;
	}
private function locale2handle (string $locale): string
	{
		if (
			!preg_match('/^' . HandleValidator::$handlePattern . '$/', $locale) ||
			in_array(strtolower($locale), HandleValidator::$baseReservedWords, true)
		) {
			$localeParts = array_filter(preg_split('/[^a-zA-Z0-9]/', $locale));

			return $localeParts ? '_' . implode('_', $localeParts) : '';
		}

		return $locale;
	}
private function locale2handle ( string $ locale ) : string { if ( ! preg_match ( '/^' . HandleValidator :: $ handlePattern . '$/' , $ locale ) || in_array ( strtolower ( $ locale ) , HandleValidator :: $ baseReservedWords , true ) ) { $ localeParts = array_filter ( preg_split ( '/[^a-zA-Z0-9]/' , $ locale ) ) ; return $ localeParts ? '_' . implode ( '_' , $ localeParts ) : '' ; } return $ locale ; }
Returns a site handle based on a given locale.

@param string $locale

@return string
Returns a site handle based on a given locale .