Private/Polyfony/Bundles.php
public static function getLocales(string $bundle) :array {

		// declare an array to hold the list
		$locales = array();
		// set the locales path
		$locales_path = "../Private/Bundles/{$bundle}/Locales/";
		// if the directory exists
		if(file_exists($locales_path) && is_dir($locales_path)) {
			// for each file in the directory
			foreach(scandir($locales_path) as $locales_file) {
				// if the file is a normal one
				if(substr($locales_file,0,1) != '.' ) {
					// push it into the array of locales
					$locales[] = $locales_path . $locales_file ;
				}
			}
		}
		// return all found locales
		return($locales);
		
	}
public static function getLocales(string $bundle) :array {

		// declare an array to hold the list
		$locales = array();
		// set the locales path
		$locales_path = "../Private/Bundles/{$bundle}/Locales/";
		// if the directory exists
		if(file_exists($locales_path) && is_dir($locales_path)) {
			// for each file in the directory
			foreach(scandir($locales_path) as $locales_file) {
				// if the file is a normal one
				if(substr($locales_file,0,1) != '.' ) {
					// push it into the array of locales
					$locales[] = $locales_path . $locales_file ;
				}
			}
		}
		// return all found locales
		return($locales);
		
	}
public static function getLocales ( string $ bundle ) : array { // declare an array to hold the list $ locales = array ( ) ; // set the locales path $ locales_path = "../Private/Bundles/{$bundle}/Locales/" ; // if the directory exists if ( file_exists ( $ locales_path ) && is_dir ( $ locales_path ) ) { // for each file in the directory foreach ( scandir ( $ locales_path ) as $ locales_file ) { // if the file is a normal one if ( substr ( $ locales_file , 0 , 1 ) != '.' ) { // push it into the array of locales $ locales [ ] = $ locales_path . $ locales_file ; } } } // return all found locales return ( $ locales ) ; }
get locales for a bundle
get locales for a bundle