Neos\Flow\I18n\EelHelper\TranslationParameterToken::locale PHP Method

locale() public method

The locale Identifier will be converted into a Locale
public locale ( string $locale ) : TranslationParameterToken
$locale string An identifier of locale to use (NULL for use the default locale)
return TranslationParameterToken
    public function locale($locale)
    {
        try {
            $this->parameters['locale'] = new Locale($locale);
        } catch (InvalidLocaleIdentifierException $e) {
            throw new FlowException(sprintf('"%s" is not a valid locale identifier.', $locale), 1436784806);
        }
        return $this;
    }