src/Gelembjuk/Locale/Utils.php
public function getMissedKeysTemplate($group,$locale,$deflocale,$mode = 'empty',$returntype = 'text', $textlinesplitter = "\n") {
		$translate = $this->getTranslateObject(true);
		$translate->setLocale($deflocale);
		
		$difference = $this->getDifference($group,$locale,$deflocale);
		
		$fixtextlines = array();
		
		foreach ($difference['missed'] as $key) {
			$line = $key.' = ';
			
			if ($mode == 'empty') {
				$line .= '#';
			}
			$defvalue = $translate->getText($key,$group);
			$line .= $defvalue;
			
			if ($returntype == 'hash') {
				$fixtextlines[$key] = $defvalue;
			} else {
				$fixtextlines[] = $line;
			}
		}
		
		if ($returntype == 'lines' || $returntype == 'hash') {
			return $fixtextline;
		}
		return implode($textlinesplitter,$fixtextlines);
	}
public function getMissedKeysTemplate($group,$locale,$deflocale,$mode = 'empty',$returntype = 'text', $textlinesplitter = "\n") {
		$translate = $this->getTranslateObject(true);
		$translate->setLocale($deflocale);
		
		$difference = $this->getDifference($group,$locale,$deflocale);
		
		$fixtextlines = array();
		
		foreach ($difference['missed'] as $key) {
			$line = $key.' = ';
			
			if ($mode == 'empty') {
				$line .= '#';
			}
			$defvalue = $translate->getText($key,$group);
			$line .= $defvalue;
			
			if ($returntype == 'hash') {
				$fixtextlines[$key] = $defvalue;
			} else {
				$fixtextlines[] = $line;
			}
		}
		
		if ($returntype == 'lines' || $returntype == 'hash') {
			return $fixtextline;
		}
		return implode($textlinesplitter,$fixtextlines);
	}
public function getMissedKeysTemplate ( $ group , $ locale , $ deflocale , $ mode = 'empty' , $ returntype = 'text' , $ textlinesplitter = "\n" ) { $ translate = $ this -> getTranslateObject ( true ) ; $ translate -> setLocale ( $ deflocale ) ; $ difference = $ this -> getDifference ( $ group , $ locale , $ deflocale ) ; $ fixtextlines = array ( ) ; foreach ( $ difference [ 'missed' ] as $ key ) { $ line = $ key . ' = ' ; if ( $ mode == 'empty' ) { $ line .= '#' ; } $ defvalue = $ translate -> getText ( $ key , $ group ) ; $ line .= $ defvalue ; if ( $ returntype == 'hash' ) { $ fixtextlines [ $ key ] = $ defvalue ; } else { $ fixtextlines [ ] = $ line ; } } if ( $ returntype == 'lines' || $ returntype == 'hash' ) { return $ fixtextline ; } return implode ( $ textlinesplitter , $ fixtextlines ) ; }
Returns text of array of lines to add toa secondary locale group to correct it

@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 string $mode `empty` or `default`. If empty then generated keys are empty and deflocale value is added as comment

@return array|string
Returns text of array of lines to add toa secondary locale group to correct it