Actions
Feature #89162
openProvide possibility to switch from connected mode to free translation mode
Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2019-09-12
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
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.
Updated by Sybille Peters about 4 years ago
- 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
Updated by Philipp Parzer about 4 years ago
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')]
);
}
}
Updated by Sybille Peters almost 4 years ago
@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 ...
Updated by Jo Hasenau over 1 year ago
- Related to Story #101564: User Interface related translation issues added
Actions