mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
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:
parent
812b96bdac
commit
1d33c69c8c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user