Classes/Base/Locale.php
public static function get( \Aimeos\MShop\Context\Item\Iface $context, \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null )
	{
		if( !isset( self::$locale ) )
		{
			$config = $context->getConfig();


			$sitecode = $config->get( 'mshop/locale/site', 'default' );
			$name = $config->get( 'typo3/param/name/site', 'site' );

			if( $request !== null && $request->hasArgument( $name ) === true ) {
				$sitecode = $request->getArgument( $name );
			} elseif( ( $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP( 'S' ) ) !== null ) {
				$sitecode = $value;
			}


			$langid = $config->get( 'mshop/locale/language', '' );
			$name = $config->get( 'typo3/param/name/language', 'locale' );

			if( $request !== null && $request->hasArgument( $name ) === true ) {
				$langid = $request->getArgument( $name );
			} elseif( isset( $GLOBALS['TSFE']->config['config']['language'] ) ) {
				$langid = $GLOBALS['TSFE']->config['config']['language'];
			}


			$currency = $config->get( 'mshop/locale/currency', '' );
			$name = $config->get( 'typo3/param/name/currency', 'currency' );

			if( $request !== null && $request->hasArgument( $name ) === true ) {
				$currency = $request->getArgument( $name );
			} elseif( ( $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP( 'C' ) ) !== null ) {
				$currency = $value;
			}


			$localeManager = \Aimeos\MShop::create( $context, 'locale' );
			self::$locale = $localeManager->bootstrap( $sitecode, $langid, $currency );
		}

		return self::$locale;
	}
public static function get( \Aimeos\MShop\Context\Item\Iface $context, \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null )
	{
		if( !isset( self::$locale ) )
		{
			$config = $context->getConfig();


			$sitecode = $config->get( 'mshop/locale/site', 'default' );
			$name = $config->get( 'typo3/param/name/site', 'site' );

			if( $request !== null && $request->hasArgument( $name ) === true ) {
				$sitecode = $request->getArgument( $name );
			} elseif( ( $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP( 'S' ) ) !== null ) {
				$sitecode = $value;
			}


			$langid = $config->get( 'mshop/locale/language', '' );
			$name = $config->get( 'typo3/param/name/language', 'locale' );

			if( $request !== null && $request->hasArgument( $name ) === true ) {
				$langid = $request->getArgument( $name );
			} elseif( isset( $GLOBALS['TSFE']->config['config']['language'] ) ) {
				$langid = $GLOBALS['TSFE']->config['config']['language'];
			}


			$currency = $config->get( 'mshop/locale/currency', '' );
			$name = $config->get( 'typo3/param/name/currency', 'currency' );

			if( $request !== null && $request->hasArgument( $name ) === true ) {
				$currency = $request->getArgument( $name );
			} elseif( ( $value = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP( 'C' ) ) !== null ) {
				$currency = $value;
			}


			$localeManager = \Aimeos\MShop::create( $context, 'locale' );
			self::$locale = $localeManager->bootstrap( $sitecode, $langid, $currency );
		}

		return self::$locale;
	}
public static function get ( \ Aimeos \ MShop \ Context \ Item \ Iface $ context , \ TYPO3 \ CMS \ Extbase \ Mvc \ RequestInterface $ request = null ) { if ( ! isset ( self :: $ locale ) ) { $ config = $ context -> getConfig ( ) ; $ sitecode = $ config -> get ( 'mshop/locale/site' , 'default' ) ; $ name = $ config -> get ( 'typo3/param/name/site' , 'site' ) ; if ( $ request !== null && $ request -> hasArgument ( $ name ) === true ) { $ sitecode = $ request -> getArgument ( $ name ) ; } elseif ( ( $ value = \ TYPO3 \ CMS \ Core \ Utility \ GeneralUtility :: _GP ( 'S' ) ) !== null ) { $ sitecode = $ value ; } $ langid = $ config -> get ( 'mshop/locale/language' , '' ) ; $ name = $ config -> get ( 'typo3/param/name/language' , 'locale' ) ; if ( $ request !== null && $ request -> hasArgument ( $ name ) === true ) { $ langid = $ request -> getArgument ( $ name ) ; } elseif ( isset ( $ GLOBALS [ 'TSFE' ] -> config [ 'config' ] [ 'language' ] ) ) { $ langid = $ GLOBALS [ 'TSFE' ] -> config [ 'config' ] [ 'language' ] ; } $ currency = $ config -> get ( 'mshop/locale/currency' , '' ) ; $ name = $ config -> get ( 'typo3/param/name/currency' , 'currency' ) ; if ( $ request !== null && $ request -> hasArgument ( $ name ) === true ) { $ currency = $ request -> getArgument ( $ name ) ; } elseif ( ( $ value = \ TYPO3 \ CMS \ Core \ Utility \ GeneralUtility :: _GP ( 'C' ) ) !== null ) { $ currency = $ value ; } $ localeManager = \ Aimeos \ MShop :: create ( $ context , 'locale' ) ; self :: $ locale = $ localeManager -> bootstrap ( $ sitecode , $ langid , $ currency ) ; } return self :: $ locale ; }
Returns the locale object for frontend

@param \Aimeos\MShop\Context\Item\Iface $context Context object
@param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object
@return \Aimeos\MShop\Locale\Item\Iface Locale item object
Returns the locale object for frontend