protected function execute(InputInterface $input, OutputInterface $output)
{
$this->input = $input;
$this->output = $output;
$this->formatter = new SymfonyStyle($input, $output);
if (!$this->multiLanguageIsEnabled) {
$this->formatter->error(['site.multilanguage should be set to true in parameters.yml.', 'Warning: All your urls will change from example.com/page to example.com/[locale]/page']);
return;
}
$this->installedLocale = array_flip($this->settings->get('Core', 'languages'));
$this->interfaceLocale = array_flip($this->settings->get('Core', 'interface_languages'));
$this->enabledLocale = array_flip($this->settings->get('Core', 'active_languages'));
$this->redirectLocale = array_flip($this->settings->get('Core', 'redirect_languages'));
$this->defaultEnabledLocale = $this->settings->get('Core', 'default_language');
$this->defaultInterfaceLocale = $this->settings->get('Core', 'default_interface_language');
$this->output->writeln($this->formatter->title('Fork CMS locale enable'));
$this->showLocaleOverview();
$this->selectWorkingLocale();
if (!$this->askToInstall()) {
return;
}
$this->askToAddInterfaceLocale();
if ($this->askToMakeTheLocaleAccessibleToVisitors()) {
$this->askToEnableTheLocaleForRedirecting();
}
}