本文整理汇总了PHP中AppLocale::getAllLocales方法的典型用法代码示例。如果您正苦于以下问题:PHP AppLocale::getAllLocales方法的具体用法?PHP AppLocale::getAllLocales怎么用?PHP AppLocale::getAllLocales使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppLocale
的用法示例。
在下文中一共展示了AppLocale::getAllLocales方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* Display the form.
*/
function display()
{
$conference =& Request::getConference();
$schedConf =& Request::getSchedConf();
$user =& Request::getUser();
$templateMgr =& TemplateManager::getManager();
// Get tracks for this conference
$trackDao = DAORegistry::getDAO('TrackDAO');
// If this user is a track director or a director, they are
// allowed to submit to tracks flagged as "director-only" for
// submissions. Otherwise, display only tracks they are allowed
// to submit to.
$roleDao = DAORegistry::getDAO('RoleDAO');
$isDirector = $roleDao->userHasRole($conference->getId(), $schedConf->getId(), $user->getId(), ROLE_ID_DIRECTOR) || $roleDao->userHasRole($conference->getId(), $schedConf->getId(), $user->getId(), ROLE_ID_TRACK_DIRECTOR) || $roleDao->userHasRole($conference->getId(), 0, $user->getId(), ROLE_ID_DIRECTOR) || $roleDao->userHasRole($conference->getId(), 0, $user->getId(), ROLE_ID_TRACK_DIRECTOR);
$templateMgr->assign('trackOptions', array('0' => __('author.submit.selectTrack')) + $trackDao->getTrackTitles($schedConf->getId(), !$isDirector));
$paperTypeDao = DAORegistry::getDAO('PaperTypeDAO');
$sessionTypes = $paperTypeDao->getPaperTypes($schedConf->getId());
$templateMgr->assign('sessionTypes', $sessionTypes->toArray());
// Provide available submission languages. (Convert the array
// of locale symbolic names xx_XX into an associative array
// of symbolic names => readable names.)
$supportedSubmissionLocales = $conference->getSetting('supportedSubmissionLocales');
if (empty($supportedSubmissionLocales)) {
$supportedSubmissionLocales = array($conference->getPrimaryLocale());
}
$templateMgr->assign('supportedSubmissionLocaleNames', array_flip(array_intersect(array_flip(AppLocale::getAllLocales()), $supportedSubmissionLocales)));
parent::display();
}
示例2: execute
/**
* Execute the command
*/
function execute()
{
$stderr = fopen('php://stdout', 'w');
$locales = AppLocale::getAllLocales();
$dbConn = DBConnection::getConn();
foreach ($locales as $locale => $localeName) {
fprintf($stderr, "Checking {$localeName}...\n");
$oldTemplatesText = $this->fetchFileVersion('ojs', "locale/{$locale}/emailTemplates.xml", $this->oldTag);
$newTemplatesText = $this->fetchFileVersion('ojs', "locale/{$locale}/emailTemplates.xml", $this->newTag);
if ($oldTemplatesText === false || $newTemplatesText === false) {
fprintf($stderr, "Skipping {$localeName}; could not fetch.\n");
continue;
}
$oldEmails = $this->parseEmails($oldTemplatesText);
$newEmails = $this->parseEmails($newTemplatesText);
foreach ($oldEmails['email_text'] as $oi => $junk) {
$key = $junk['attributes']['key'];
$ni = null;
foreach ($newEmails['email_text'] as $ni => $junk) {
if ($key == $junk['attributes']['key']) {
break;
}
}
if ($oldEmails['subject'][$oi]['value'] != $newEmails['subject'][$ni]['value']) {
echo "UPDATE email_templates_default_data SET subject='" . $dbConn->escape($newEmails['subject'][$ni]['value']) . "' WHERE key='" . $dbConn->escape($key) . "' AND locale='" . $dbConn->escape($locale) . "' AND subject='" . $dbConn->escape($oldEmails['subject'][$oi]['value']) . "';\n";
}
if ($oldEmails['body'][$oi]['value'] != $newEmails['body'][$ni]['value']) {
echo "UPDATE email_templates_default_data SET body='" . $dbConn->escape($newEmails['body'][$ni]['value']) . "' WHERE key='" . $dbConn->escape($key) . "' AND locale='" . $dbConn->escape($locale) . "' AND body='" . $dbConn->escape($oldEmails['body'][$oi]['value']) . "';\n";
}
}
}
fclose($stderr);
}
示例3: __construct
/**
* Constructor.
* @param $request PKPRequest
*/
function __construct($request)
{
parent::__construct($request, 'install/install.tpl');
// FIXME Move the below options to an external configuration file?
$this->supportedLocales = AppLocale::getAllLocales();
$this->localesComplete = array();
foreach ($this->supportedLocales as $key => $name) {
$this->localesComplete[$key] = AppLocale::isLocaleComplete($key);
}
$this->supportedClientCharsets = array('utf-8' => 'Unicode (UTF-8)', 'iso-8859-1' => 'Western (ISO-8859-1)');
$this->supportedConnectionCharsets = array('' => __('common.notApplicable'), 'utf8' => 'Unicode (UTF-8)');
$this->supportedDatabaseCharsets = array('' => __('common.notApplicable'), 'utf8' => 'Unicode (UTF-8)');
$this->supportedDatabaseDrivers = array('mysql' => array('mysql', 'MySQL'), 'mysqli' => array('mysqli', 'MySQLi'), 'postgres' => array('pgsql', 'PostgreSQL'), 'oracle' => array('oci8', 'Oracle'), 'mssql' => array('mssql', 'MS SQL Server'), 'fbsql' => array('fbsql', 'FrontBase'), 'ibase' => array('ibase', 'Interbase'), 'firebird' => array('ibase', 'Firebird'), 'informix' => array('ifx', 'Informix'), 'sybase' => array('sybase', 'Sybase'), 'odbc' => array('odbc', 'ODBC'));
// Validation checks for this form
$this->addCheck(new FormValidatorInSet($this, 'locale', 'required', 'installer.form.localeRequired', array_keys($this->supportedLocales)));
$this->addCheck(new FormValidatorCustom($this, 'locale', 'required', 'installer.form.localeRequired', array('AppLocale', 'isLocaleValid')));
$this->addCheck(new FormValidatorInSet($this, 'clientCharset', 'required', 'installer.form.clientCharsetRequired', array_keys($this->supportedClientCharsets)));
$this->addCheck(new FormValidator($this, 'filesDir', 'required', 'installer.form.filesDirRequired'));
$this->addCheck(new FormValidator($this, 'adminUsername', 'required', 'installer.form.usernameRequired'));
$this->addCheck(new FormValidatorUsername($this, 'adminUsername', 'required', 'installer.form.usernameAlphaNumeric'));
$this->addCheck(new FormValidator($this, 'adminPassword', 'required', 'installer.form.passwordRequired'));
$this->addCheck(new FormValidatorCustom($this, 'adminPassword', 'required', 'installer.form.passwordsDoNotMatch', create_function('$password,$form', 'return $password == $form->getData(\'adminPassword2\');'), array($this)));
$this->addCheck(new FormValidatorEmail($this, 'adminEmail', 'required', 'installer.form.emailRequired'));
$this->addCheck(new FormValidatorInSet($this, 'databaseDriver', 'required', 'installer.form.databaseDriverRequired', array_keys($this->supportedDatabaseDrivers)));
$this->addCheck(new FormValidator($this, 'databaseName', 'required', 'installer.form.databaseNameRequired'));
}
示例4: InstallForm
/**
* Constructor.
*/
function InstallForm()
{
parent::Form('install/install.tpl');
// FIXME Move the below options to an external configuration file?
$this->supportedLocales = AppLocale::getAllLocales();
$this->localesComplete = array();
foreach ($this->supportedLocales as $key => $name) {
$this->localesComplete[$key] = AppLocale::isLocaleComplete($key);
}
$this->supportedClientCharsets = array('utf-8' => 'Unicode (UTF-8)', 'iso-8859-1' => 'Western (ISO-8859-1)');
$this->supportedConnectionCharsets = array('' => __('common.notApplicable'), 'utf8' => 'Unicode (UTF-8)');
$this->supportedDatabaseCharsets = array('' => __('common.notApplicable'), 'utf8' => 'Unicode (UTF-8)');
$this->supportedEncryptionAlgorithms = array('md5' => 'MD5');
if (function_exists('sha1')) {
$this->supportedEncryptionAlgorithms['sha1'] = 'SHA1';
}
$this->supportedDatabaseDrivers = array('mysql' => array('mysql', 'MySQL'), 'postgres' => array('pgsql', 'PostgreSQL'), 'oracle' => array('oci8', 'Oracle'), 'mssql' => array('mssql', 'MS SQL Server'), 'fbsql' => array('fbsql', 'FrontBase'), 'ibase' => array('ibase', 'Interbase'), 'firebird' => array('ibase', 'Firebird'), 'informix' => array('ifx', 'Informix'), 'sybase' => array('sybase', 'Sybase'), 'odbc' => array('odbc', 'ODBC'));
// Validation checks for this form
$this->addCheck(new FormValidatorInSet($this, 'locale', 'required', 'installer.form.localeRequired', array_keys($this->supportedLocales)));
$this->addCheck(new FormValidatorCustom($this, 'locale', 'required', 'installer.form.localeRequired', array('AppLocale', 'isLocaleValid')));
$this->addCheck(new FormValidatorInSet($this, 'clientCharset', 'required', 'installer.form.clientCharsetRequired', array_keys($this->supportedClientCharsets)));
$this->addCheck(new FormValidator($this, 'filesDir', 'required', 'installer.form.filesDirRequired'));
$this->addCheck(new FormValidatorInSet($this, 'encryption', 'required', 'installer.form.encryptionRequired', array_keys($this->supportedEncryptionAlgorithms)));
$this->addCheck(new FormValidator($this, 'adminUsername', 'required', 'installer.form.usernameRequired'));
$this->addCheck(new FormValidatorAlphaNum($this, 'adminUsername', 'required', 'installer.form.usernameAlphaNumeric'));
$this->addCheck(new FormValidatorLength($this, 'adminPassword', 'required', 'user.register.form.passwordLengthTooShort', '>=', INSTALLER_DEFAULT_MIN_PASSWORD_LENGTH));
$this->addCheck(new FormValidator($this, 'adminPassword', 'required', 'installer.form.passwordRequired'));
$this->addCheck(new FormValidatorCustom($this, 'adminPassword', 'required', 'installer.form.passwordsDoNotMatch', create_function('$password,$form', 'return $password == $form->getData(\'adminPassword2\');'), array(&$this)));
$this->addCheck(new FormValidatorEmail($this, 'adminEmail', 'required', 'installer.form.emailRequired'));
$this->addCheck(new FormValidatorInSet($this, 'databaseDriver', 'required', 'installer.form.databaseDriverRequired', array_keys($this->supportedDatabaseDrivers)));
$this->addCheck(new FormValidator($this, 'databaseName', 'required', 'installer.form.databaseNameRequired'));
$this->addCheck(new FormValidatorPost($this));
}
示例5: languages
/**
* Display form to modify site language settings.
* @param $args array
* @param $request object
*/
function languages($args, &$request)
{
$this->validate();
$this->setupTemplate(true);
$site =& $request->getSite();
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('localeNames', AppLocale::getAllLocales());
$templateMgr->assign('primaryLocale', $site->getPrimaryLocale());
$templateMgr->assign('supportedLocales', $site->getSupportedLocales());
$localesComplete = array();
foreach (AppLocale::getAllLocales() as $key => $name) {
$localesComplete[$key] = AppLocale::isLocaleComplete($key);
}
$templateMgr->assign('localesComplete', $localesComplete);
$templateMgr->assign('installedLocales', $site->getInstalledLocales());
$templateMgr->assign('uninstalledLocales', array_diff(array_keys(AppLocale::getAllLocales()), $site->getInstalledLocales()));
$templateMgr->assign('helpTopicId', 'site.siteManagement');
import('classes.i18n.LanguageAction');
$languageAction = new LanguageAction();
if ($languageAction->isDownloadAvailable()) {
$templateMgr->assign('downloadAvailable', true);
$templateMgr->assign('downloadableLocales', $languageAction->getDownloadableLocales());
}
$templateMgr->display('admin/languages.tpl');
}
示例6: getGalleyLabel
/**
* Get the localized value of the galley label.
* @return $string
*/
function getGalleyLabel()
{
$label = $this->getLabel();
if ($this->getLocale() != AppLocale::getLocale()) {
$locales = AppLocale::getAllLocales();
$label .= ' (' . $locales[$this->getLocale()] . ')';
}
return $label;
}
示例7: lockss
function lockss($args, $request)
{
$this->validate();
$this->setupTemplate();
$journal =& $request->getJournal();
$templateMgr =& TemplateManager::getManager();
if ($journal != null) {
if (!$journal->getSetting('enableLockss')) {
$request->redirect(null, 'index');
}
$year = $request->getUserVar('year');
$issueDao =& DAORegistry::getDAO('IssueDAO');
// FIXME Should probably go in IssueDAO or a subclass
if (isset($year)) {
$year = (int) $year;
$result =& $issueDao->retrieve('SELECT * FROM issues WHERE journal_id = ? AND year = ? AND published = 1 ORDER BY current DESC, year ASC, volume ASC, number ASC', array($journal->getId(), $year));
if ($result->RecordCount() == 0) {
unset($year);
}
}
if (!isset($year)) {
$showInfo = true;
$result =& $issueDao->retrieve('SELECT MAX(year) FROM issues WHERE journal_id = ? AND published = 1', $journal->getId());
list($year) = $result->fields;
$result =& $issueDao->retrieve('SELECT * FROM issues WHERE journal_id = ? AND year = ? AND published = 1 ORDER BY current DESC, year ASC, volume ASC, number ASC', array($journal->getId(), $year));
} else {
$showInfo = false;
}
$issues = new DAOResultFactory($result, $issueDao, '_returnIssueFromRow');
$prevYear = null;
$nextYear = null;
if (isset($year)) {
$result =& $issueDao->retrieve('SELECT MAX(year) FROM issues WHERE journal_id = ? AND published = 1 AND year < ?', array($journal->getId(), $year));
list($prevYear) = $result->fields;
$result =& $issueDao->retrieve('SELECT MIN(year) FROM issues WHERE journal_id = ? AND published = 1 AND year > ?', array($journal->getId(), $year));
list($nextYear) = $result->fields;
}
$templateMgr->assign_by_ref('journal', $journal);
$templateMgr->assign_by_ref('issues', $issues);
$templateMgr->assign('year', $year);
$templateMgr->assign('prevYear', $prevYear);
$templateMgr->assign('nextYear', $nextYear);
$templateMgr->assign('showInfo', $showInfo);
$locales =& $journal->getSupportedLocaleNames();
if (!isset($locales) || empty($locales)) {
$localeNames =& AppLocale::getAllLocales();
$primaryLocale = AppLocale::getPrimaryLocale();
$locales = array($primaryLocale => $localeNames[$primaryLocale]);
}
$templateMgr->assign_by_ref('locales', $locales);
} else {
$journalDao =& DAORegistry::getDAO('JournalDAO');
$journals =& $journalDao->getJournals(true);
$templateMgr->assign_by_ref('journals', $journals);
}
$templateMgr->display('gateway/lockss.tpl');
}
示例8: MetadataForm
/**
* Constructor.
*/
function MetadataForm($article, $journal)
{
$roleDao =& DAORegistry::getDAO('RoleDAO');
$signoffDao =& DAORegistry::getDAO('SignoffDAO');
$user =& Request::getUser();
$roleId = $roleDao->getRoleIdFromPath(Request::getRequestedPage());
// If the user is an editor of this article, make the entire form editable.
$this->canEdit = false;
$this->isEditor = false;
if ($roleId != null && ($roleId == ROLE_ID_EDITOR || $roleId == ROLE_ID_SECTION_EDITOR)) {
$this->canEdit = true;
$this->isEditor = true;
}
$copyeditInitialSignoff = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $article->getId());
// If the user is an author and the article hasn't passed the Copyediting stage, make the form editable.
if ($roleId == ROLE_ID_AUTHOR) {
if ($article->getStatus() != STATUS_PUBLISHED && ($copyeditInitialSignoff == null || $copyeditInitialSignoff->getDateCompleted() == null)) {
$this->canEdit = true;
}
}
// Copy editors are also allowed to edit metadata, but only if they have
// a current assignment to the article.
if ($roleId != null && $roleId == ROLE_ID_COPYEDITOR) {
$copyeditFinalSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $article->getId());
if ($copyeditFinalSignoff != null && $article->getStatus() != STATUS_PUBLISHED) {
if ($copyeditInitialSignoff->getDateNotified() != null && $copyeditFinalSignoff->getDateCompleted() == null) {
$this->canEdit = true;
}
}
}
if ($this->canEdit) {
$supportedSubmissionLocales = $journal->getSetting('supportedSubmissionLocales');
if (empty($supportedSubmissionLocales)) {
$supportedSubmissionLocales = array($journal->getPrimaryLocale());
}
parent::Form('submission/metadata/metadataEdit.tpl', true, $article->getLocale(), array_flip(array_intersect(array_flip(AppLocale::getAllLocales()), $supportedSubmissionLocales)));
$this->addCheck(new FormValidatorLocale($this, 'title', 'required', 'author.submit.form.titleRequired', $this->getRequiredLocale()));
$this->addCheck(new FormValidatorArray($this, 'authors', 'required', 'author.submit.form.authorRequiredFields', array('firstName', 'lastName')));
$this->addCheck(new FormValidatorArrayCustom($this, 'authors', 'required', 'author.submit.form.authorRequiredFields', create_function('$email, $regExp', 'return String::regexp_match($regExp, $email);'), array(ValidatorEmail::getRegexp()), false, array('email')));
$this->addCheck(new FormValidatorArrayCustom($this, 'authors', 'required', 'user.profile.form.urlInvalid', create_function('$url, $regExp', 'return empty($url) ? true : String::regexp_match($regExp, $url);'), array(ValidatorUrl::getRegexp()), false, array('url')));
// Add ORCiD validation
import('lib.pkp.classes.validation.ValidatorORCID');
$this->addCheck(new FormValidatorArrayCustom($this, 'authors', 'required', 'user.profile.form.orcidInvalid', create_function('$orcid', '$validator = new ValidatorORCID(); return empty($orcid) ? true : $validator->isValid($orcid);'), array(), false, array('orcid')));
} else {
parent::Form('submission/metadata/metadataView.tpl');
}
// If the user is a reviewer of this article, do not show authors.
$this->canViewAuthors = true;
if ($roleId != null && $roleId == ROLE_ID_REVIEWER) {
$this->canViewAuthors = false;
}
$this->article = $article;
$this->addCheck(new FormValidatorPost($this));
}
示例9: callback
/**
* Hook callback function for TemplateManager::display
* @param $hookName string
* @param $args array
* @return boolean
*/
function callback($hookName, $args)
{
$request =& Registry::get('request');
$templateManager =& $args[0];
$allLocales = AppLocale::getAllLocales();
$localeList = array();
foreach ($allLocales as $key => $locale) {
$localeList[] = String::substr($key, 0, 2);
}
$templateManager->assign('additionalHeadData', $templateManager->get_template_vars('additionalHeadData') . $templateManager->fetch($this->getTemplatePath() . 'header.tpl'));
return false;
}
示例10: initialize
/**
* @copydoc Gridhandler::initialize()
*/
function initialize($request, $args = null)
{
parent::initialize($request);
$this->tabsSelector = $request->getUserVar('tabsSelector');
// Set the grid details.
$this->setInstructions('plugins.generic.translator.localeDescription');
$this->setGridDataElements(AppLocale::getAllLocales());
// Columns
$cellProvider = new LiteralGridCellProvider();
$this->addColumn(new GridColumn('id', 'common.language', null, 'controllers/grid/gridCell.tpl', $cellProvider));
$this->addColumn(new GridColumn('name', 'common.name', null, 'controllers/grid/gridCell.tpl', $cellProvider, array('width' => 80, 'alignment' => COLUMN_ALIGNMENT_LEFT)));
}
示例11: getSupportedLocales
/**
* Get all supported locales for the current context.
* @return array
*/
static function getSupportedLocales()
{
static $supportedLocales;
if (!isset($supportedLocales)) {
if (defined('SESSION_DISABLE_INIT') || !Config::getVar('general', 'installed')) {
$supportedLocales = AppLocale::getAllLocales();
} else {
$site =& self::$request->getSite();
$supportedLocales = $site->getSupportedLocaleNames();
}
}
return $supportedLocales;
}
示例12: callback
/**
* Hook callback function for TemplateManager::display
* @param $hookName string
* @param $args array
* @return boolean
*/
function callback($hookName, $args)
{
// Only pages requests interest us here
$request =& $this->getRequest();
if (!is_a($request->getRouter(), 'PKPPageRouter')) {
return null;
}
$templateManager =& $args[0];
$page = $request->getRequestedPage();
$op = $request->getRequestedOp();
$baseUrl = $templateManager->get_template_vars('baseUrl');
$additionalHeadData = $templateManager->get_template_vars('additionalHeadData');
$allLocales = AppLocale::getAllLocales();
$localeList = array();
foreach ($allLocales as $key => $locale) {
$localeList[] = String::substr($key, 0, 2);
}
$tinymceScript = '
<script src="' . $baseUrl . '/' . TINYMCE_JS_PATH . '/tiny_mce_gzip.js"></script>
<script>
tinyMCE_GZ.init({
relative_urls : "false",
plugins : "paste,jbimages,fullscreen",
themes : "advanced",
languages : "' . join(',', $localeList) . '",
disk_cache : true
});
</script>
<script>
tinyMCE.init({
entity_encoding : "raw",
plugins : "paste,jbimages,fullscreen",
mode: "specific_textareas",
editor_selector: "richContent",
language : "' . String::substr(AppLocale::getLocale(), 0, 2) . '",
relative_urls : false,
forced_root_block : false,
paste_auto_cleanup_on_paste : true,
apply_source_formatting : false,
theme : "advanced",
theme_advanced_buttons1 : "cut,copy,paste,|,bold,italic,underline,bullist,numlist,|,link,unlink,help,code,fullscreen,jbimages",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
init_instance_callback: $.pkp.controllers.SiteHandler.prototype.triggerTinyMCEInitialized,
setup: $.pkp.controllers.SiteHandler.prototype.triggerTinyMCESetup
});
</script>';
$templateManager->assign('additionalHeadData', $additionalHeadData . "\n" . $tinymceScript);
return false;
}
示例13: array
/**
* Return associative array of all locales supported by the site.
* These locales are used to provide a language toggle on the main site pages.
* @return array
*/
function &getSupportedLocaleNames()
{
$supportedLocales =& Registry::get('siteSupportedLocales', true, null);
if ($supportedLocales === null) {
$supportedLocales = array();
$localeNames =& AppLocale::getAllLocales();
$locales = $this->getSupportedLocales();
foreach ($locales as $localeKey) {
$supportedLocales[$localeKey] = $localeNames[$localeKey];
}
asort($supportedLocales);
}
return $supportedLocales;
}
示例14: index
function index($args, $request)
{
$this->validate();
$plugin =& $this->plugin;
$this->setupTemplate($request);
$rangeInfo = $this->getRangeInfo($request, 'locales');
$templateMgr = TemplateManager::getManager($request);
import('lib.pkp.classes.core.ArrayItemIterator');
$templateMgr->assign('locales', new ArrayItemIterator(AppLocale::getAllLocales(), $rangeInfo->getPage(), $rangeInfo->getCount()));
$templateMgr->assign('masterLocale', MASTER_LOCALE);
// Test whether the tar binary is available for the export to work
$tarBinary = Config::getVar('cli', 'tar');
$templateMgr->assign('tarAvailable', !empty($tarBinary) && file_exists($tarBinary));
$templateMgr->display($plugin->getTemplatePath() . 'index.tpl');
}
示例15: AuthorSubmitForm
/**
* Constructor.
* @param $article object
* @param $step int
*/
function AuthorSubmitForm(&$article, $step, &$journal)
{
// Provide available submission languages. (Convert the array
// of locale symbolic names xx_XX into an associative array
// of symbolic names => readable names.)
$supportedSubmissionLocales = $journal->getSetting('supportedSubmissionLocales');
if (empty($supportedSubmissionLocales)) {
$supportedSubmissionLocales = array($journal->getPrimaryLocale());
}
parent::Form(sprintf('author/submit/step%d.tpl', $step), true, $article ? $article->getLocale() : AppLocale::getLocale(), array_flip(array_intersect(array_flip(AppLocale::getAllLocales()), $supportedSubmissionLocales)));
$this->addCheck(new FormValidatorPost($this));
$this->step = (int) $step;
$this->article = $article;
$this->articleId = $article ? $article->getId() : null;
}