zwiicms-translations/tools/check.php

8 lines
381 B
PHP
Raw Normal View History

2022-12-29 10:42:45 +01:00
<?php
$fr = json_decode(file_get_contents('../fr_FR.json'), true);
2022-12-29 10:50:03 +01:00
$pt = json_decode(file_get_contents('../en_EN.json'), true);
2022-12-29 10:42:45 +01:00
$intersec = array_intersect_key($pt, $fr);
$dif = array_diff_key($fr, $pt);
$merge = array_merge($dif, $intersec);
2022-12-29 10:50:03 +01:00
file_put_contents('../en_EN.json', json_encode($merge, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT));