/** * action languages * * @return void */ public function languagesAction() { $countries = $this->countryLanguageRepository->findAll(); $countryLanguage = $this->countryLanguageRepository->findByUid($GLOBALS['TSFE']->sys_language_uid); $this->view->assign('currentCountry', $countryLanguage); $this->view->assign('sameCountries', $this->countryLanguageRepository->findByFlag($countryLanguage->getFlag())); $this->view->assign('settings', $this->settings); }
/** * action updatetyposcript * * @return void */ public function updatetyposcriptAction() { $args = $this->request->getArguments(); if (isset($args['config'])) { $tsfile = PATH_site . "typo3conf/ext/countrymanager/Configuration/TypoScript/AutomaticLanguageConfiguration/setup.txt"; if (t3lib_div::writeFile($tsfile, $args['config'])) { $this->flashMessages->add('TypoScript successfully writen written. Make sure to add the static TS template "Typo3 Country Manager – Automatic Language Configuration" to your master-template.'); } else { $this->flashMessages->add('TypoScript could not be written.'); } } $countries = $this->countryLanguageRepository->findAll(); $this->view->assign('content_fallback', $this->settings['sys_language_mode'] == 'content_fallback' ? true : false); if (isset($this->settings['defaultCountryUid'])) { $this->view->assign('defaultCountry', $this->countryLanguageRepository->findByUid(intval($this->settings['defaultCountryUid']))); } $this->view->assign('countries', $countries); //$this->view->assign('debug', $countries); }