Compare commits
2 Commits
1683435d5d
...
c7c955ecad
Author | SHA1 | Date | |
---|---|---|---|
c7c955ecad | |||
af4be4ed7f |
@ -31,8 +31,6 @@ 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
|
||||
@ -136,7 +134,8 @@ class I18n implements MissingKeyInterface
|
||||
$search = [];
|
||||
|
||||
foreach($matches as $item) {
|
||||
$search[ $item[0] ] = Iterate::arrayGet($parameters, $item[1]);
|
||||
$iterate = Iterate::arrayGet($parameters, $item[1]);
|
||||
$search[ $item[0] ] = $iterate !== null ? $iterate : $item[0];
|
||||
}
|
||||
|
||||
return str_replace(array_keys($search), array_values($search), $string);
|
||||
|
Loading…
x
Reference in New Issue
Block a user