Issue Bug Closed

#51920Unable to change language in CLI mode with the current localization utility

Rémy DANIEL 09/11/13, 16:25 updated 05/07/19, 12:17

Description

I have some batch processing in CLI mode (thus with a BE context).
In a multilingual website, a same batch can process a task for all the defined languages, one after an other.

But the localization utility initialize only once the LOCAL_LANG array, only for the first queried language.
This leads into some translation issues in the frontend when a content processed by a batch process is rendered.

Actually, I have added to the class TYPO3\CMS\Extbase\Utility\LocalizationUtility a method for reseting the LOCAL_LANG array, which I call when I want to change the language.

But maybe there is a proper way, or maybe we should have an api to change the current language ?

Reviews 1