Compare commits

..

No commits in common. "c7c955ecadb9cb5746eb7605717ae57b1ec21628" and "1683435d5d9a68fcc223810b1d651dd705b26afe" have entirely different histories.

View File

@ -31,6 +31,8 @@ class I18n implements MissingKeyInterface
$this->dataReader = $dataReader;
$this->cacheReader = $cacheReader;
$this->missingKey = $missingKey;
$this->locale = \Locale::getDefault() ?: $this->locale;
}
public function initialize(bool $useCache) : bool
@ -134,8 +136,7 @@ class I18n implements MissingKeyInterface
$search = [];
foreach($matches as $item) {
$iterate = Iterate::arrayGet($parameters, $item[1]);
$search[ $item[0] ] = $iterate !== null ? $iterate : $item[0];
$search[ $item[0] ] = Iterate::arrayGet($parameters, $item[1]);
}
return str_replace(array_keys($search), array_values($search), $string);