0
votes

I've got a small problem with a TYPO3 extension.

The extension is translated in english and german (default is german) and I now need to switch the language programmatically.

Reason: We got some cronjobs running that create files using the language selected by the user for certain tasks (e.g. creating bills).

I am using TYPO3 6.x with Extbase and Fluid.

1
What is translated? The records in backend or the language files?pgampe
I have language files (.xml) that are translatedphil

1 Answers

1
votes

In your cronjob, change the language of the current backend user. You can use the $GLOBALS['BE_USER'] variable to access this. It has a property for the language. However, you might need to reinitialize the language service. How a look into the bootstrap to see how this is done.