Project

General

Profile

Actions

Bug #51920

closed

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

Added by Rémy DANIEL almost 11 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase + l10n
Target version:
-
Start date:
2013-09-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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 ?


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #82354: Add possibility to get a label in a specific language in LocalizationUtility::translate()ClosedMarkus Hölzle2017-09-07

Actions
Actions

Also available in: Atom PDF