[Neos] Label translation in yaml file

Visay Keo visay.keo at typo3.org
Wed Jan 14 06:50:41 CET 2015


Hi Bastian,

I have similar question related to translating the confirmation message 
in the finisher. I don't see a way to do that with the viewhelper or 
with my custom template.

What is the approach for handling this?

Best,
Visay

On 13 មករា 2015 21:08, Bastian Waidelich wrote:
> On 13.01.15, at 09:10, Sokly Phal wrote:
>
> Hi Sokly,
>
>> I found the solution now [...]
>
> Well done, that's exactly the way to go.
>
>
>
>> - In my custom Field.html file, I use <f:translate> viewhelper to render
>> the translation
>>
>>      <f:translate id="{element.identifier}" package="My.SitePackage">
>
> You can also refer to *renderingOptions.translationPackage* instead of
> hard-coding the package key. Also you could specify a different "source"
> if you don't want to mix-up your Main.xlf labels with form specific ones
> (like we already do for the validation messages[1]).
> The result could look like:
>
> {element.identifier -> f:translate(id: element.identifier, package:
> '{element.renderingOptions.translationPackage}', source: 'Forms')}:
>
> To change the translation package, specify it in your form preset settings:
>
> TYPO3:
>    Form:
>      presets:
>        'yourPreset':
>            'TYPO3.Form:Base':
>              renderingOptions:
>                translationPackage: 'Acme.YourPackage'
>
> And don't forget to copy the ValidationErrors.xlf files to that package,
> too.
>
> Best
>
> [1]
> https://git.typo3.org/Packages/TYPO3.Form.git/blob/HEAD:/Resources/Private/Form/Layouts/Field.html
>
>

-- 
TYPO3 .... Inspiring People To Share!
Participate: http://typo3.org/participate/


More information about the Neos mailing list