#90619Translations doesn't work well
Description
I have some categories called “Allgemeine Dokumente” and “Unterkategorie” and translated it from german to english.
“Allgemeine Dokumente” -> “General Documents“
“Unterkategorie” -> “Subcategory”
I translated my example page but now the english title will be displayed always.
In my extension I just did something simple:
// PluginController
protected function defaultAction() {
// Already imported the CategoryRepository class.
$repository = $this->objectManager->get(CategoryRepository::class);
$query = $repository->createQuery();
$settings = $query->getQuerySettings();
$settings->setRespectSysLanguage(true);
// Language uid 0 === german, 1 === english
$settings->setLanguageUid(0);
$query->setQuerySettings($settings);
$this->view->assign('categories', $query->execute());
}
Where is the problem? Why I get the “german” record with an english title?!
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 2
History 3
-
Luca Braun changed subject
Translations doesn't working wellTranslations doesn't work well target version <span data-processor="relativetime" data-value="2020-03-02T16:13:17+00:00" > 03/02/20, 16:13 </span> -
Christian Eßl changed category <span data-processor="relativetime" data-value="2020-03-07T16:51:09+00:00" > 03/07/20, 16:51 </span>
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-14T07:23:01+00:00" > 10/14/26, 07:23 </span>
Hey,
this has been fixed with utiliziing setLanguageAspect() in v12, which is now 100% in line with the rest of TYPO3 Core, this way one can configure this properly in their queryAspects, also with MM / Categories.
If you feel this is the wrong decision, let me know and I will re-open it.