src/Gelembjuk/Locale/Utils.php
public function getEmptyKeysWithDefValues($group,$locale,$deflocale,$skipfiles = true) {
		$translate = $this->getTranslateObject(true);
		$translate->setLocale($deflocale);
		
		$allkeys = $translate->getAllKeysForGroup($group);
		$alltranslates = $translate->getDataForGroup($group);
		
		$translate->setLocale($locale);
		
		try {
			$keys = $translate->getAllKeysForGroup($group);
			$translates = $translate->getDataForGroup($group);
		} catch (\Exception $e) {
			$keys = array();
			$translates = array();
		}
		
		$missed = array_values(array_diff($allkeys,$keys));
		
		$result = array();
		
		foreach ($translates as $key => $value) {
			if ($value == '') {
				$missed[] = $key;
			}
		}
		
		foreach ($missed as $key) {
			$result[$key] = $alltranslates[$key];
			
			if ($result[$key] == '') {
				$result[$key] = '*';
			} elseif (strpos($result[$key],'file:') === 0 && $skipfiles) {
				unset($result[$key]);
			}
		}

		return $result;
	}
public function getEmptyKeysWithDefValues($group,$locale,$deflocale,$skipfiles = true) {
		$translate = $this->getTranslateObject(true);
		$translate->setLocale($deflocale);
		
		$allkeys = $translate->getAllKeysForGroup($group);
		$alltranslates = $translate->getDataForGroup($group);
		
		$translate->setLocale($locale);
		
		try {
			$keys = $translate->getAllKeysForGroup($group);
			$translates = $translate->getDataForGroup($group);
		} catch (\Exception $e) {
			$keys = array();
			$translates = array();
		}
		
		$missed = array_values(array_diff($allkeys,$keys));
		
		$result = array();
		
		foreach ($translates as $key => $value) {
			if ($value == '') {
				$missed[] = $key;
			}
		}
		
		foreach ($missed as $key) {
			$result[$key] = $alltranslates[$key];
			
			if ($result[$key] == '') {
				$result[$key] = '*';
			} elseif (strpos($result[$key],'file:') === 0 && $skipfiles) {
				unset($result[$key]);
			}
		}

		return $result;
	}
public function getEmptyKeysWithDefValues ( $ group , $ locale , $ deflocale , $ skipfiles = true ) { $ translate = $ this -> getTranslateObject ( true ) ; $ translate -> setLocale ( $ deflocale ) ; $ allkeys = $ translate -> getAllKeysForGroup ( $ group ) ; $ alltranslates = $ translate -> getDataForGroup ( $ group ) ; $ translate -> setLocale ( $ locale ) ; try { $ keys = $ translate -> getAllKeysForGroup ( $ group ) ; $ translates = $ translate -> getDataForGroup ( $ group ) ; } catch ( \ Exception $ e ) { $ keys = array ( ) ; $ translates = array ( ) ; } $ missed = array_values ( array_diff ( $ allkeys , $ keys ) ) ; $ result = array ( ) ; foreach ( $ translates as $ key => $ value ) { if ( $ value == '' ) { $ missed [ ] = $ key ; } } foreach ( $ missed as $ key ) { $ result [ $ key ] = $ alltranslates [ $ key ] ; if ( $ result [ $ key ] == '' ) { $ result [ $ key ] = '*' ; } elseif ( strpos ( $ result [ $ key ] , 'file:' ) === 0 && $ skipfiles ) { unset ( $ result [ $ key ] ) ; } } return $ result ; }
Returns all empty keys from a group and associated values from def locale group

@param string $group Translation group
@param string $locale Locale to compare to default locale
@param string $deflocale Default locale to use as a base for comparing
@param bool $skipfiles If to skip keys pointing to files with a text

@return array|string
Returns all empty keys from a group and associated values from def locale group