public static function getLabels()
    {
        if(!file_exists(accioPath('resources/lang/'.App::getLocale()))) {
            return json_encode([]);
        }

        // Load Project translation files
        $translationFiles = File::files(accioPath('resources/lang/'.App::getLocale())); //@TODO check if it produces errors, Faton

        $labels = [];
        foreach ($translationFiles as $file) {
            $fileName = str_replace('.php', '', $file->getFilename());
            $labels[$fileName] = File::getRequire($file->getPathName());
        }

        // Load plugin translations
        $labels += Plugin::getAllLabels();

        return $labels;
    }
public static function getLabels()
    {
        if(!file_exists(accioPath('resources/lang/'.App::getLocale()))) {
            return json_encode([]);
        }

        // Load Project translation files
        $translationFiles = File::files(accioPath('resources/lang/'.App::getLocale())); //@TODO check if it produces errors, Faton

        $labels = [];
        foreach ($translationFiles as $file) {
            $fileName = str_replace('.php', '', $file->getFilename());
            $labels[$fileName] = File::getRequire($file->getPathName());
        }

        // Load plugin translations
        $labels += Plugin::getAllLabels();

        return $labels;
    }
public static function getLabels ( ) { if ( ! file_exists ( accioPath ( 'resources/lang/' . App :: getLocale ( ) ) ) ) { return json_encode ( [ ] ) ; } // Load Project translation files $ translationFiles = File :: files ( accioPath ( 'resources/lang/' . App :: getLocale ( ) ) ) ; //@TODO check if it produces errors, Faton $ labels = [ ] ; foreach ( $ translationFiles as $ file ) { $ fileName = str_replace ( '.php' , '' , $ file -> getFilename ( ) ) ; $ labels [ $ fileName ] = File :: getRequire ( $ file -> getPathName ( ) ) ; } // Load plugin translations $ labels += Plugin :: getAllLabels ( ) ; return $ labels ; }
Get all the labels of the current language and store them in array by directory name.

@return array Returns all labels from current language
Get all the labels of the current language and store them in array by directory name .