"; foreach ($files as $locale) { $po_file = __DIR__ . "/languages/alldami-site-migration-{$locale}.po"; $mo_file = __DIR__ . "/languages/alldami-site-migration-{$locale}.mo"; if (!file_exists($po_file)) { echo "PO file not found: {$po_file}\n"; continue; } $po = new PO(); if (!$po->import_from_file($po_file)) { echo "Error importing PO file: {$locale}\n"; continue; } $mo = new MO(); $mo->merge_with($po); if ($mo->export_to_file($mo_file)) { echo "Successfully compiled: {$locale} -> .mo\n"; } else { echo "Error exporting MO file: {$locale}\n"; } } echo "\nDone! Verify the languages now."; echo "";