public function insert($strKey, $arrReplace) {
		$data = $this->arrData;
		foreach (explode('.', $strKey) as $p) {
			if (isset($data[$p]))
				$data = $data[$p];
			else
				return $this->returnKey($strKey).'('.json_encode($arrReplace).')';
		}

		$arrSearch = array();
		$arrValues = array();
		foreach ($arrReplace as $key => $value) {
			$arrSearch[] = '{'.$key.'}';
			$arrValues[] = $value;
		}

		return str_replace($arrSearch, $arrValues, (string) $data);
	}
public function insert($strKey, $arrReplace) {
		$data = $this->arrData;
		foreach (explode('.', $strKey) as $p) {
			if (isset($data[$p]))
				$data = $data[$p];
			else
				return $this->returnKey($strKey).'('.json_encode($arrReplace).')';
		}

		$arrSearch = array();
		$arrValues = array();
		foreach ($arrReplace as $key => $value) {
			$arrSearch[] = '{'.$key.'}';
			$arrValues[] = $value;
		}

		return str_replace($arrSearch, $arrValues, (string) $data);
	}
public function insert ( $ strKey , $ arrReplace ) { $ data = $ this -> arrData ; foreach ( explode ( '.' , $ strKey ) as $ p ) { if ( isset ( $ data [ $ p ] ) ) $ data = $ data [ $ p ] ; else return $ this -> returnKey ( $ strKey ) . '(' . json_encode ( $ arrReplace ) . ')' ; } $ arrSearch = array ( ) ; $ arrValues = array ( ) ; foreach ( $ arrReplace as $ key => $ value ) { $ arrSearch [ ] = '{' . $ key . '}' ; $ arrValues [ ] = $ value ; } return str_replace ( $ arrSearch , $ arrValues , ( string ) $ data ) ; }
Gets a variable value and replaces placeholders contained in it

@param string $strKey The path for the language variable (e.g. "messages.error.single")
@param array $arrReplace Associative array containing the placeholder variables
@return string If the path could not be resolved, the path will be returned instead
Gets a variable value and replaces placeholders contained in it