Feature #89162
open
Provide possibility to switch from connected mode to free translation mode (and vice versa)
Added by Sybille Peters over 5 years ago.
Updated 4 months ago.
Description
In some cases it might be desirable to change the translation mode for a page.
- changing from connected or mixed to free. This should be possible (currently it is possible by setting l18n_parent to 0 for each record, but this is tedious).
Make this easy to do, e.g. by clicking a button.
Related issues
1 (1 open — 0 closed)
- Subject changed from Provide possibility to switch from connected mode to free translation mode (and vice versa) to Provide possibility to switch from connected mode to free translation mode
- Description updated (diff)
Got this Command as a Workaround - callable via Scheduler for example:
class LanguageCommand extends Command
{
protected static $defaultName = 'siwaProject:splitLanguage';
protected function configure()
{
$this->setDescription('Changes a Page from connected to free mode');
$this->addArgument('pid', InputArgument::REQUIRED, 'Page ID');
$this->addArgument('language', InputArgument::REQUIRED, 'Language ID');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$databaseConnection = GeneralUtility::makeInstance(ConnectionPool::class)
->getConnectionForTable("tt_content");
$databaseConnection->update(
"tt_content",
['l18n_parent' => 0],
['pid' => $input->getArgument('pid'), 'sys_language_uid' => $input->getArgument('language')]
);
}
}
@Philip Parzer
Got this Command as a Workaround - callable via Scheduler for example:
Should work, but shouldn't DataHandler be used instead for this kind of operation? This will leave a trail (writes sys_history records), do checks etc. It is a bit slower though ...
- Related to Story #101564: User Interface related translation issues added
- Subject changed from Provide possibility to switch from connected mode to free translation mode to Provide possibility to switch from connected mode to free translation mode (and vice versa)
Also available in: Atom
PDF