src/Gelembjuk/Locale/TranslateManagement.php
public function getAllGroups() {
		if ($this->locale == '') {
			throw new \Exception('Locale is not set');
		}

		$folder_path = $this->localespath.$this->locale.'/';

		if (!is_dir($folder_path)) {
			throw new \Exception('Locale folder not found');
		}

		$files = @scandir($folder_path);

		$groups = array();

		if (is_array($files)) {
			foreach ($files as $file) {
				if (is_file($folder_path.$file) && strtolower(pathinfo($folder_path.$file, PATHINFO_EXTENSION)) == 'txt') {
					if (preg_match('!^(.+)\\.txt!i',$file,$m)) {
						$groups[] = $m[1];
					}
				}
			}
		}

		return $groups;
	}
public function getAllGroups() {
		if ($this->locale == '') {
			throw new \Exception('Locale is not set');
		}

		$folder_path = $this->localespath.$this->locale.'/';

		if (!is_dir($folder_path)) {
			throw new \Exception('Locale folder not found');
		}

		$files = @scandir($folder_path);

		$groups = array();

		if (is_array($files)) {
			foreach ($files as $file) {
				if (is_file($folder_path.$file) && strtolower(pathinfo($folder_path.$file, PATHINFO_EXTENSION)) == 'txt') {
					if (preg_match('!^(.+)\\.txt!i',$file,$m)) {
						$groups[] = $m[1];
					}
				}
			}
		}

		return $groups;
	}
public function getAllGroups ( ) { if ( $ this -> locale == '' ) { throw new \ Exception ( 'Locale is not set' ) ; } $ folder_path = $ this -> localespath . $ this -> locale . '/' ; if ( ! is_dir ( $ folder_path ) ) { throw new \ Exception ( 'Locale folder not found' ) ; } $ files = @ scandir ( $ folder_path ) ; $ groups = array ( ) ; if ( is_array ( $ files ) ) { foreach ( $ files as $ file ) { if ( is_file ( $ folder_path . $ file ) && strtolower ( pathinfo ( $ folder_path . $ file , PATHINFO_EXTENSION ) ) == 'txt' ) { if ( preg_match ( '!^(.+)\\.txt!i' , $ file , $ m ) ) { $ groups [ ] = $ m [ 1 ] ; } } } } return $ groups ; }
Get array of all groups for current locale

@return array
Get array of all groups for current locale