Allow for custom client-side localization strings (#3505)

Fixes #3504. Allows for localization strings to be considered before client-side lang compilation. Credit to @bombozama
This commit is contained in:
Gonzalo Henríquez 2018-04-15 04:39:30 -03:00 committed by Luke Towers
parent 812b96bdac
commit 1d33c69c8c

View File

@ -215,6 +215,14 @@ class OctoberUtil extends Command
$messages = array_replace_recursive($messages, require $srcPath);
}
/*
* Load possible replacements from /lang
*/
$overridePath = base_path() . '/lang/'.$locale.'/system/client.php';
if (File::isFile($overridePath)) {
$messages = array_replace_recursive($messages, require $overridePath);
}
/*
* Compile from stub and save file
*/