protected static function translateParsedLocaleToAppValue (\stdClass $parsedLocale) {
		if (!static::$windowsPlatform) {
			$result = $parsedLocale;
		} else {
			$result = (object) array_merge([], (array) $parsedLocale);
			if (!static::$LANGS) static::prepareWinConfigOppositeArrays();

			$langAndLocale = $parsedLocale->lang . ($parsedLocale->locale !== NULL ? $parsedLocale->locale : '');
			if (isset(static::$EXCEPTIONS[$langAndLocale])) {
				$exception = static::$EXCEPTIONS[$langAndLocale];
				$result->lang = $exception[0];
				$result->locale = $exception[1];
				if ($result->locale === NULL && isset($exception[5]))
					$result->locale = ($exception[5]
						? $exception[6]
						: static::$exceptionsLocales[$exception[6]]);
				$result->script = $exception[2];
			} else {
				$result->system = $result->lang;
				$langNameUpper = strtoupper($result->lang);
				$result->lang = (isset(static::$LANGS[$langNameUpper])
					? static::$LANGS[$langNameUpper]
					: $result->lang);
				if ($result->script !== NULL) {
					$result->system .= '_' . $result->script;
					$scriptNameUpper = strtoupper($result->script);
					$result->script = (isset(static::$SCRIPTS[$scriptNameUpper])
						? static::$SCRIPTS[$scriptNameUpper]
						: $result->script);
				}
				if ($result->locale !== NULL) {
					$result->system .= '_' . $result->locale;
					$localeNameUpper = strtoupper($result->locale);
					$result->locale = (isset(static::$LOCALES[$localeNameUpper])
						? static::$LOCALES[$localeNameUpper]
						: $result->locale );
				}
			}
			if ($result->encoding !== NULL) {
				$encodingOpposite = static::$encodings[$result->encoding];
				if ($encodingOpposite) {
					$result->system .= '.' . $result->encoding;
					$result->encoding = $encodingOpposite;
				} else {
					$result->system .= '.' . $result->encoding;
				}
			}
		}
		return $result;
	}
protected static function translateParsedLocaleToAppValue (\stdClass $parsedLocale) {
		if (!static::$windowsPlatform) {
			$result = $parsedLocale;
		} else {
			$result = (object) array_merge([], (array) $parsedLocale);
			if (!static::$LANGS) static::prepareWinConfigOppositeArrays();

			$langAndLocale = $parsedLocale->lang . ($parsedLocale->locale !== NULL ? $parsedLocale->locale : '');
			if (isset(static::$EXCEPTIONS[$langAndLocale])) {
				$exception = static::$EXCEPTIONS[$langAndLocale];
				$result->lang = $exception[0];
				$result->locale = $exception[1];
				if ($result->locale === NULL && isset($exception[5]))
					$result->locale = ($exception[5]
						? $exception[6]
						: static::$exceptionsLocales[$exception[6]]);
				$result->script = $exception[2];
			} else {
				$result->system = $result->lang;
				$langNameUpper = strtoupper($result->lang);
				$result->lang = (isset(static::$LANGS[$langNameUpper])
					? static::$LANGS[$langNameUpper]
					: $result->lang);
				if ($result->script !== NULL) {
					$result->system .= '_' . $result->script;
					$scriptNameUpper = strtoupper($result->script);
					$result->script = (isset(static::$SCRIPTS[$scriptNameUpper])
						? static::$SCRIPTS[$scriptNameUpper]
						: $result->script);
				}
				if ($result->locale !== NULL) {
					$result->system .= '_' . $result->locale;
					$localeNameUpper = strtoupper($result->locale);
					$result->locale = (isset(static::$LOCALES[$localeNameUpper])
						? static::$LOCALES[$localeNameUpper]
						: $result->locale );
				}
			}
			if ($result->encoding !== NULL) {
				$encodingOpposite = static::$encodings[$result->encoding];
				if ($encodingOpposite) {
					$result->system .= '.' . $result->encoding;
					$result->encoding = $encodingOpposite;
				} else {
					$result->system .= '.' . $result->encoding;
				}
			}
		}
		return $result;
	}
protected static function translateParsedLocaleToAppValue ( \ stdClass $ parsedLocale ) { if ( ! static :: $ windowsPlatform ) { $ result = $ parsedLocale ; } else { $ result = ( object ) array_merge ( [ ] , ( array ) $ parsedLocale ) ; if ( ! static :: $ LANGS ) static :: prepareWinConfigOppositeArrays ( ) ; $ langAndLocale = $ parsedLocale -> lang . ( $ parsedLocale -> locale !== NULL ? $ parsedLocale -> locale : '' ) ; if ( isset ( static :: $ EXCEPTIONS [ $ langAndLocale ] ) ) { $ exception = static :: $ EXCEPTIONS [ $ langAndLocale ] ; $ result -> lang = $ exception [ 0 ] ; $ result -> locale = $ exception [ 1 ] ; if ( $ result -> locale === NULL && isset ( $ exception [ 5 ] ) ) $ result -> locale = ( $ exception [ 5 ] ? $ exception [ 6 ] : static :: $ exceptionsLocales [ $ exception [ 6 ] ] ) ; $ result -> script = $ exception [ 2 ] ; } else { $ result -> system = $ result -> lang ; $ langNameUpper = strtoupper ( $ result -> lang ) ; $ result -> lang = ( isset ( static :: $ LANGS [ $ langNameUpper ] ) ? static :: $ LANGS [ $ langNameUpper ] : $ result -> lang ) ; if ( $ result -> script !== NULL ) { $ result -> system .= '_' . $ result -> script ; $ scriptNameUpper = strtoupper ( $ result -> script ) ; $ result -> script = ( isset ( static :: $ SCRIPTS [ $ scriptNameUpper ] ) ? static :: $ SCRIPTS [ $ scriptNameUpper ] : $ result -> script ) ; } if ( $ result -> locale !== NULL ) { $ result -> system .= '_' . $ result -> locale ; $ localeNameUpper = strtoupper ( $ result -> locale ) ; $ result -> locale = ( isset ( static :: $ LOCALES [ $ localeNameUpper ] ) ? static :: $ LOCALES [ $ localeNameUpper ] : $ result -> locale ) ; } } if ( $ result -> encoding !== NULL ) { $ encodingOpposite = static :: $ encodings [ $ result -> encoding ] ; if ( $ encodingOpposite ) { $ result -> system .= '.' . $ result -> encoding ; $ result -> encoding = $ encodingOpposite ; } else { $ result -> system .= '.' . $ result -> encoding ; } } } return $ result ; }
Translate parsed system locale value into application locale value.
Do not translate anything on non-windows plaforms, but translate windows system
locale value language, terotiry and encoding combination into standard application values.
@param \stdClass $parsedLocale
@return \stdClass
Translate parsed system locale value into application locale value . Do not translate anything on non - windows plaforms but translate windows system locale value language terotiry and encoding combination into standard application values .