public function language()
    {
        $languages = [
            'en_US' => [
                'url' => '/installer/startup/requirements?locale=en_US',
                'welcome' => 'Welcome to QuickAppsCMS',
                'action' => 'Click here to install in English'
            ]
        ];

        $Folder = new Folder(Plugin::classPath('Installer') . 'Locale');
        foreach ($Folder->read(false, true, true)[0] as $path) {
            $code = basename($path);
            $file = $path . '/installer.po';

            if (is_readable($file)) {
                I18n::locale($code); // trick for __d()
                $languages[$code] = [
                    'url' => "/installer/startup/requirements?locale={$code}",
                    'welcome' => __d('installer', 'Welcome to QuickAppsCMS'),
                    'action' => __d('installer', 'Click here to install in English')
                ];
            }
        }

        I18n::locale('en_US');
        $this->title('Welcome to QuickAppsCMS');
        $this->set('languages', $languages);
        $this->_step();
    }
public function language()
    {
        $languages = [
            'en_US' => [
                'url' => '/installer/startup/requirements?locale=en_US',
                'welcome' => 'Welcome to QuickAppsCMS',
                'action' => 'Click here to install in English'
            ]
        ];

        $Folder = new Folder(Plugin::classPath('Installer') . 'Locale');
        foreach ($Folder->read(false, true, true)[0] as $path) {
            $code = basename($path);
            $file = $path . '/installer.po';

            if (is_readable($file)) {
                I18n::locale($code); // trick for __d()
                $languages[$code] = [
                    'url' => "/installer/startup/requirements?locale={$code}",
                    'welcome' => __d('installer', 'Welcome to QuickAppsCMS'),
                    'action' => __d('installer', 'Click here to install in English')
                ];
            }
        }

        I18n::locale('en_US');
        $this->title('Welcome to QuickAppsCMS');
        $this->set('languages', $languages);
        $this->_step();
    }
public function language ( ) { $ languages = [ 'en_US' => [ 'url' => '/installer/startup/requirements?locale=en_US' , 'welcome' => 'Welcome to QuickAppsCMS' , 'action' => 'Click here to install in English' ] ] ; $ Folder = new Folder ( Plugin :: classPath ( 'Installer' ) . 'Locale' ) ; foreach ( $ Folder -> read ( false , true , true ) [ 0 ] as $ path ) { $ code = basename ( $ path ) ; $ file = $ path . '/installer.po' ; if ( is_readable ( $ file ) ) { I18n :: locale ( $ code ) ; // trick for __d() $ languages [ $ code ] = [ 'url' => "/installer/startup/requirements?locale={$code}" , 'welcome' => __d ( 'installer' , 'Welcome to QuickAppsCMS' ) , 'action' => __d ( 'installer' , 'Click here to install in English' ) ] ; } } I18n :: locale ( 'en_US' ) ; $ this -> title ( 'Welcome to QuickAppsCMS' ) ; $ this -> set ( 'languages' , $ languages ) ; $ this -> _step ( ) ; }
First step of the installation process.

User must select the language they want to use for the installation process.

@return void
First step of the installation process .