Bug #3068

Fluid: TranslateViewHelper does only work once

Added by Niels Pardon over 13 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
-
Target version:
-
Start date:
2009-04-10
Due date:
% Done:

100%

Estimated time:
Has patch:

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?


Files

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

Also available in: Atom PDF