Skip to content

Commit

Permalink
Merge branch 'staging' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
pinta83 committed Sep 5, 2019
2 parents 922baab + 5468d33 commit 12a8eb8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions installation/controller/setdefaultlanguage.php
Expand Up @@ -9,6 +9,8 @@

defined('_JEXEC') or die;

use Joomla\CMS\Language\LanguageHelper;

/**
* Controller class to set the default application languages for the Joomla Installer.
*
Expand Down Expand Up @@ -96,6 +98,17 @@ public function execute()

if ((int) $data['activateMultilanguage'])
{
if (count(LanguageHelper::getInstalledLanguages(0)) < 2)
{
$app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_MULTILANG'), 'warning');

$r = new stdClass;

// Redirect to the same page.
$r->view = 'defaultlanguage';
$app->sendJsonResponse($r);
}

if (!$model->enablePlugin('plg_system_languagefilter'))
{
$app->enqueueMessage(JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGEFILTER', $frontend_lang), 'warning');
Expand Down
1 change: 1 addition & 0 deletions installation/language/en-GB/en-GB.ini
Expand Up @@ -168,6 +168,7 @@ INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_MODULESWHITCHER_LANGUAGECODE="Joomla was
INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGECODE="Joomla was unable to automatically enable the Language Code Plugin."
INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGEFILTER="Joomla was unable to automatically enable the Language Filter Plugin."
INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE="Joomla was unable to install %s language."
INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_MULTILANG="Joomla was unable to install the multilingual sample data as only one language is installed. To activate the multilingual feature, you need to install more languages, press the 'Previous' button and choose the desired languages from the list."
INSTL_DEFAULTLANGUAGE_COULD_NOT_PUBLISH_MOD_MULTILANGSTATUS="Joomla was unable to automatically publish the language status module."
INSTL_DEFAULTLANGUAGE_COULD_NOT_UNPUBLISH_MOD_DEFAULTMENU="Joomla was unable to automatically unpublish the default menu module."
INSTL_DEFAULTLANGUAGE_DESC="Joomla has installed the following languages. Please select your desired default language for the Joomla Administrator."
Expand Down

0 comments on commit 12a8eb8

Please sign in to comment.