function init() { /* if( $this->hasKickstartData() ) { $data = $this->kickstartData(); return $this->kickstartContinueNextStep(); } */ // // Get all available languages // $languages = false; $defaultLanguage = false; $defaultExtraLanguages = false; eZSetupLanguageList($languages, $defaultLanguage, $defaultExtraLanguages); // // Get info about package and site languages // $siteLanguageLocaleList = $this->PersistenceList['regional_info']['languages']; $packageNameList = array(); $packageLanguageLocaleList = array(); $sitePackageName = $this->chosenSitePackage(); $sitePackage = eZPackage::fetch($sitePackageName, false, false, false); if (is_object($sitePackage)) { $dependencies = $sitePackage->attribute('dependencies'); $requirements = $dependencies['requires']; foreach ($requirements as $req) { $packageNameList[] = $req['name']; } $packageLanguageLocaleList = eZPackage::languageInfoFromPackageList($packageNameList, false); } // Explicitly add 'eng-GB' cause clean data is in 'eng-GB'. if (!in_array('eng-GB', $packageLanguageLocaleList)) { $packageLanguageLocaleList[] = 'eng-GB'; } // // Exclude languages which exist both in packges and site. // $packageLanguageLocaleList = array_diff($packageLanguageLocaleList, $siteLanguageLocaleList); if (count($packageLanguageLocaleList) > 0) { // // Get language names // $siteLanguageList = array(); $packageLanguageList = array(); foreach ($languages as $language) { $locale = $language->attribute('locale_code'); $name = $language->attribute('intl_language_name'); if (in_array($locale, $siteLanguageLocaleList)) { $siteLanguageList[] = array('locale' => $locale, 'name' => $name); } if (in_array($locale, $packageLanguageLocaleList)) { $packageLanguageList[] = array('locale' => $locale, 'name' => $name); } } $this->MissedPackageLanguageList = $packageLanguageList; $this->SiteLanguageList = $siteLanguageList; return false; } // There are no language conflicts => proceed with next step return true; }