src/Utility/L10n.php
public function map($mixed = null) {
		if (is_array($mixed)) {
			$result = [];
			foreach ($mixed as $_mixed) {
				$_result = $this->map($_mixed);
				if ($_result) {
					$result[$_mixed] = $_result;
				}
			}
			return $result;
		}
		if (is_string($mixed)) {
			if (strlen($mixed) === 2 && in_array($mixed, $this->_l10nMap)) {
				return array_search($mixed, $this->_l10nMap);
			}
			if (isset($this->_l10nMap[$mixed])) {
				return $this->_l10nMap[$mixed];
			}
			return false;
		}
		return $this->_l10nMap;
	}
public function map($mixed = null) {
		if (is_array($mixed)) {
			$result = [];
			foreach ($mixed as $_mixed) {
				$_result = $this->map($_mixed);
				if ($_result) {
					$result[$_mixed] = $_result;
				}
			}
			return $result;
		}
		if (is_string($mixed)) {
			if (strlen($mixed) === 2 && in_array($mixed, $this->_l10nMap)) {
				return array_search($mixed, $this->_l10nMap);
			}
			if (isset($this->_l10nMap[$mixed])) {
				return $this->_l10nMap[$mixed];
			}
			return false;
		}
		return $this->_l10nMap;
	}
public function map ( $ mixed = null ) { if ( is_array ( $ mixed ) ) { $ result = [ ] ; foreach ( $ mixed as $ _mixed ) { $ _result = $ this -> map ( $ _mixed ) ; if ( $ _result ) { $ result [ $ _mixed ] = $ _result ; } } return $ result ; } if ( is_string ( $ mixed ) ) { if ( strlen ( $ mixed ) === 2 && in_array ( $ mixed , $ this -> _l10nMap ) ) { return array_search ( $ mixed , $ this -> _l10nMap ) ; } if ( isset ( $ this -> _l10nMap [ $ mixed ] ) ) { return $ this -> _l10nMap [ $ mixed ] ; } return false ; } return $ this -> _l10nMap ; }
Attempts to find locale for language, or language for locale

@param string|array|null $mixed 2/3 char string (language/locale), array of those strings, or null
@return string|array|bool string language/locale, array of those values, whole map as an array,
or false when language/locale doesn't exist
Attempts to find locale for language or language for locale