[Flow] default locale / i18n question

Alexander Berl a.berl at outlook.com
Wed May 15 18:19:47 CEST 2013


Hi Winfried,

the form.* ViewHelpers do not know about Locales, as they only abstract
the html tags and do not know if a property they access needs special
formatting. If you want to have the values be localized there are two
methods:

- Use a format ViewHelper (format.number doesn't currently work with
locales, but you can use the format.currency as a template or
cherry-pick from https://review.typo3.org/#/c/20788/) and explicitly set
the textfield value with value="{model.amount -> f:format...}"

- Add locale aware getters into your model that use the L18n formatter
directly

Regards,
Alexander

Am 14.05.2013 11:15, schrieb Winfried Mingst:
> Please help me:
> 
> how can I number format a form.textfield to display its value with
> locale decimal separator.
> 
> ..
> <f:form.textfield property="amount"/>
> ..
> 
> 
> Am 10.05.2013 10:05, schrieb Winfried Mingst:
>> Hello,
>>
>> I would like to have german validation error messages.
>> Decimal input fields should display and accept the german decimal
>> seperator ",".
>>
>> I set default locale in my package's Settings.yaml:
>>
>> TYPO3:
>>    Flow:
>>      i18n:
>>        defaultLocale: 'de'
>>
>> But Messages are still in English and there are validation errors when
>> enterig decimals like "12,20". Have I forgotten something?
>> I'm using "Flow 2.0 dev-master"
>>
>> regards
>> Winfried
>>
> 


More information about the Flow mailing list