public function getViewParameters(Field $field)
    {
        $parameters = array();

        $request = $this->getCurrentRequest();
        if ($request && $request->attributes->has('_locale')) {
            $parameters['locale'] = $request->attributes->get('_locale');
        } else {
            $parameters['locale'] = $this->localeConverter->convertToPOSIX($field->languageCode);
        }

        return $parameters;
    }
public function getViewParameters(Field $field)
    {
        $parameters = array();

        $request = $this->getCurrentRequest();
        if ($request && $request->attributes->has('_locale')) {
            $parameters['locale'] = $request->attributes->get('_locale');
        } else {
            $parameters['locale'] = $this->localeConverter->convertToPOSIX($field->languageCode);
        }

        return $parameters;
    }
public function getViewParameters ( Field $ field ) { $ parameters = array ( ) ; $ request = $ this -> getCurrentRequest ( ) ; if ( $ request && $ request -> attributes -> has ( '_locale' ) ) { $ parameters [ 'locale' ] = $ request -> attributes -> get ( '_locale' ) ; } else { $ parameters [ 'locale' ] = $ this -> localeConverter -> convertToPOSIX ( $ field -> languageCode ) ; } return $ parameters ; }
Returns a hash with 'locale' as key and locale string in POSIX format as value.

Locale from request object will be used as locale if set, otherwise field language code
will be converted to locale string.

@param Field $field

@return array
Returns a hash with locale as key and locale string in POSIX format as value .