languages updated

This commit is contained in:
Diego Najar 2017-10-09 20:12:19 +02:00
parent 3f43331222
commit 62f81d7ea3

View File

@ -1,30 +0,0 @@
<?php
$string = file_get_contents("bl-languages/en.json");
$english = json_decode($string, true);
$files = glob('bl-languages/*.{json}', GLOB_BRACE);
foreach($files as $file) {
$out = $file;
$string = file_get_contents($out);
$spanish = json_decode($string, true);
$tmp = array();
$tmp['language-data'] = $spanish['language-data'];
foreach ($english as $key=>$value) {
if (isset($spanish[$key])) {
$tmp[$key] = $spanish[$key];
} else {
$tmp[$key] = $value;
}
}
$json = json_encode($tmp, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
file_put_contents($out, $json);
}