'Secteurs', 'police' => 'Police', 'special-forces' => 'Forces spéciales', 'military' => 'Armée', 'firefighters' => 'Sapeurs-pompiers', ]; // 1) Hub FR $fr_id = av_translate_page_fr($hub->ID, 'industries', $fr_titles['industries']); if ($fr_id) { echo "HUB EN #{$hub->ID} → FR #$fr_id (slug: industries)\n"; } else { echo "HUB EN #{$hub->ID} : FR creation FAILED\n"; } // 2) Detail pages FR foreach (['police', 'special-forces', 'military', 'firefighters'] as $slug) { $en = get_page_by_path("industries/$slug"); if (! $en) { echo " $slug : EN page not found — skipping\n"; continue; } $fr_id = av_translate_page_fr($en->ID, $slug, $fr_titles[$slug]); if ($fr_id) { echo " $slug : EN #{$en->ID} → FR #$fr_id\n"; } else { echo " $slug : FR creation FAILED\n"; } } echo "\nDONE. Now run /?av_generate_industries=1 again to push translated structure to FR via auto-sync.\n"; exit; });