Compare commits
No commits in common. "c7c955ecadb9cb5746eb7605717ae57b1ec21628" and "1683435d5d9a68fcc223810b1d651dd705b26afe" have entirely different histories.
c7c955ecad
...
1683435d5d
@ -31,6 +31,8 @@ class I18n implements MissingKeyInterface
|
|||||||
$this->dataReader = $dataReader;
|
$this->dataReader = $dataReader;
|
||||||
$this->cacheReader = $cacheReader;
|
$this->cacheReader = $cacheReader;
|
||||||
$this->missingKey = $missingKey;
|
$this->missingKey = $missingKey;
|
||||||
|
|
||||||
|
$this->locale = \Locale::getDefault() ?: $this->locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initialize(bool $useCache) : bool
|
public function initialize(bool $useCache) : bool
|
||||||
@ -134,8 +136,7 @@ class I18n implements MissingKeyInterface
|
|||||||
$search = [];
|
$search = [];
|
||||||
|
|
||||||
foreach($matches as $item) {
|
foreach($matches as $item) {
|
||||||
$iterate = Iterate::arrayGet($parameters, $item[1]);
|
$search[ $item[0] ] = Iterate::arrayGet($parameters, $item[1]);
|
||||||
$search[ $item[0] ] = $iterate !== null ? $iterate : $item[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return str_replace(array_keys($search), array_values($search), $string);
|
return str_replace(array_keys($search), array_values($search), $string);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user