Feature #5003

Parse output of view helper 'translate'

Added by Thomas Deinhamer over 12 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
ViewHelpers
Target version:
-
Start date:
2009-10-15
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

Expecting you have this html/template source...

<f:translate key="any">The quick brown {dog} jumps over the lazy {fox}.</f:translate>

... the 'variables' in the brackets won't get replaced anymore.
Therefor it's very complicated to print text with inline variables,
which should then get translated.

Or is there any better approach?

Thanks!

#1

Updated by Bastian Waidelich over 12 years ago

  • Project changed from TYPO3.Flow to TYPO3.Fluid
  • Target version deleted (1.0 alpha 6)
#2

Updated by Bastian Waidelich over 12 years ago

  • Category set to ViewHelpers
  • Assignee set to Sebastian Kurfuerst
  • Branch set to v4
#3

Updated by Bastian Waidelich over 12 years ago

Reminder: last patches at #4858 resolves this by adding an "arguments"-attribute to the translate view helper. Implementation needs some rework though.

#4

Updated by Thomas Deinhamer over 12 years ago

Sorry, I don't get it - how is this related to #4858?

#5

Updated by Bastian Waidelich over 12 years ago

  • Status changed from New to Resolved

Thomas Deinhamer wrote:

Hi,

Sorry, I don't get it - how is this related to #4858?

You're right, the issues are not related. But as I wrote, the patches at #4858 incorporate this feature.
Anyway, since r1505 (see http://forge.typo3.org/repositories/revision/typo3v4-mvc/1505) the arguments attribute is implemented and you can use it like

<f:translate key="foo" arguments="{0: 'val1', 1: 'val2'}">fallback</f:translate>

Thanks for the feedback
Bastian

#6

Updated by Bastian Waidelich over 12 years ago

  • % Done changed from 0 to 100

Also available in: Atom PDF