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

@ -214,6 +214,14 @@ class OctoberUtil extends Command
if (File::isFile($srcPath) && $fallbackPath != $srcPath) {
$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