Bug #3068

Fluid: TranslateViewHelper does only work once

Added by Niels Pardon over 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-04-10
Priority:Must have Due date:
Assigned To:Niels Pardon % Done:

100%

Category:-
Target version:-
Has patch: Affected Flow version:

Description

The TranslateViewHelper does only work once. If you put more than one translate tag in your template only the first gets translated.

By looking at the code I think that it gets even worse. The TranslateViewHelper will only work once per HTTP request. That means that only the first translate tag of the first loaded extension will get translated and the following translate tags won't.

The problem seems to be the initialization check. The TranslateViewHelper will not get initialized after the first instance and therefore the member variable $this->LOCAL_LANG which holds the locallang information is empty.

I would suggest to create a LanguageRegistry (a Singleton) which holds the locallang information once per extension. Where should something like this be put? extbase or fluid?

3068_fluid.patch Magnifier - Patch that will be checked in (7.3 kB) Niels Pardon, 2009-04-10 12:44

History

#1 Updated by Niels Pardon over 6 years ago

  • File 3068_fluid.patch added

#2 Updated by Niels Pardon over 6 years ago

  • File deleted (3068_fluid.patch)

#3 Updated by Niels Pardon over 6 years ago

  • Assigned To changed from Christopher Hlubek to Niels Pardon

#4 Updated by Niels Pardon over 6 years ago

  • File deleted (3068_fluid.patch)

#5 Updated by Niels Pardon over 6 years ago

#6 Updated by Niels Pardon over 6 years ago

  • % Done changed from 0 to 100

#7 Updated by Niels Pardon over 6 years ago

  • Status changed from New to Resolved

#8 Updated by Bastian Waidelich almost 6 years ago

  • Project changed from Extbase MVC Framework to TYPO3.Fluid
  • Category deleted (432)

Also available in: Atom PDF