King James Version (KJV)
For it came to pass, when David was in Edom, and Joab the captain of the host was gone up to bury the slain, after he had smitten every male in Edom;
Modern English
For when David was in Edom, and Joab the captain of the army had gone up to bury the slain, and had struck every male in Edom
Hebrew
וַיְהִ֗י בִּֽהְי֤וֹת דָּוִד֙ אֶת־אֱד֔וֹם בַּעֲל֗וֹת יוֹאָב֙ שַׂ֣ר הַצָּבָ֔א לְקַבֵּ֖ר אֶת־הַחֲלָלִ֑ים וַיַּ֥ךְ כָּל־זָכָ֖ר בֶּאֱדֽוֹם׃
vayhiy bihyvot david ʾet-ʾedvom baʿalvot yvoʾab shar haṣabaʾ lqaber ʾet-haḥalaliym vayak kal-zakar beʾedvom