terminal42 / contao-DC_Multilingual

A multilingual DC driver storing the translations in the same table for Contao Open Source CMS
17 stars 8 forks source link

tl_page #84

Closed katgirl closed 2 months ago

katgirl commented 2 months ago
// Update tl_page configuration
$GLOBALS['TL_DCA']['tl_page']['config']['dataContainer'] = \Terminal42\DcMultilingualBundle\Driver::class;
$GLOBALS['TL_DCA']['tl_page']['config']['languages'] = ['de', 'en', 'pl', 'fr', 'nl', 'da'];
$GLOBALS['TL_DCA']['tl_page']['config']['langPid'] = 'langPid';
$GLOBALS['TL_DCA']['tl_page']['config']['langColumnName'] = 'language';
$GLOBALS['TL_DCA']['tl_page']['config']['fallbackLang'] = 'de';

// Add the language fields
$GLOBALS['TL_DCA']['tl_page']['config']['sql']['keys']['langPid'] = 'index';
$GLOBALS['TL_DCA']['tl_page']['config']['sql']['keys']['language'] = 'index';
$GLOBALS['TL_DCA']['tl_page']['fields']['langPid']['sql'] = "int(10) unsigned NOT NULL default '0'";

// Make some fields translatable
$GLOBALS['TL_DCA']['tl_page']['fields']['title']['eval']['translatableFor'] = '*';
$GLOBALS['TL_DCA']['tl_page']['fields']['pageTitle']['eval']['translatableFor'] = '*';
$GLOBALS['TL_DCA']['tl_page']['fields']['description']['eval']['translatableFor'] = '*';
$GLOBALS['TL_DCA']['tl_page']['fields']['alias']['eval']['translatableFor'] = '*';

ensures that the pages are not displayed in the backend. Is this a bug or not possible with Contao? I would like to do without further trees and rather manage the translations with `contao-DC_Multilingual.

We also have Isotope running and thus the legacy_routing active.

aschempp commented 2 months ago

Contao cannot handle multilingual data in tl_page, so this can never be supported.