public function getLocalizer($type = self::LOCALIZER_DEFAULT, $locale = null)
    {
        // If no locale was passed use the active one
        if ($locale === null) {
            $locale = $this->locale;
        }

        // Retrieve valid input
        $input = $this->validateInput($locale);

        // Convert type to required format
        $type = ucfirst(strtolower($type));

        // Check for redirect -> !
        if (true === isset($input['redirect']) && null !== $input['redirect']) {
            return $this->getLocalizer($type, $input['redirect']);
        } else {
            return self::instantiate(
                'Doozr_I18n_Service_Localize_'.$type,
                [
                    self::getRegistry(),
                    $input['locale'],
                    null,
                    self::$config,
                    $input['configuration'],
                    $this->getTranslator($input['locale']),
                ]
            );
        }
    }
public function getLocalizer($type = self::LOCALIZER_DEFAULT, $locale = null)
    {
        // If no locale was passed use the active one
        if ($locale === null) {
            $locale = $this->locale;
        }

        // Retrieve valid input
        $input = $this->validateInput($locale);

        // Convert type to required format
        $type = ucfirst(strtolower($type));

        // Check for redirect -> !
        if (true === isset($input['redirect']) && null !== $input['redirect']) {
            return $this->getLocalizer($type, $input['redirect']);
        } else {
            return self::instantiate(
                'Doozr_I18n_Service_Localize_'.$type,
                [
                    self::getRegistry(),
                    $input['locale'],
                    null,
                    self::$config,
                    $input['configuration'],
                    $this->getTranslator($input['locale']),
                ]
            );
        }
    }
public function getLocalizer ( $ type = self :: LOCALIZER_DEFAULT , $ locale = null ) { // If no locale was passed use the active one if ( $ locale === null ) { $ locale = $ this -> locale ; } // Retrieve valid input $ input = $ this -> validateInput ( $ locale ) ; // Convert type to required format $ type = ucfirst ( strtolower ( $ type ) ) ; // Check for redirect -> ! if ( true === isset ( $ input [ 'redirect' ] ) && null !== $ input [ 'redirect' ] ) { return $ this -> getLocalizer ( $ type , $ input [ 'redirect' ] ) ; } else { return self :: instantiate ( 'Doozr_I18n_Service_Localize_' . $ type , [ self :: getRegistry ( ) , $ input [ 'locale' ] , null , self :: $ config , $ input [ 'configuration' ] , $ this -> getTranslator ( $ input [ 'locale' ] ) , ] ) ; } }
This method is intend to return the instance of the locale-detector.

@param string $type   The type of the formatter to return
@param string $locale The locale to use for formatter

@author Benjamin Carl <opensource@clickalicious.de>

@return Doozr_I18n_Service_Localize_Abstract The instance of the locale-detector

@throws Doozr_I18n_Service_Exception
This method is intend to return the instance of the locale - detector .