Joshua 8:24-34

24 And it cometh to pass, at Israel's finishing to slay all the inhabitants of Ai in the field, in the wilderness in which they pursued them (and they fall all of them by the mouth of the sword till their consumption), that all Israel turn back to Ai, and smite it by the mouth of the sword;
25 and all who fall during the day, of men and of women, are twelve thousand -- all men of Ai.
26 And Joshua hath not brought back his hand which he stretched out with the javelin till that he hath devoted all the inhabitants of Ai;
27 only, the cattle and the spoil of that city have Israel spoiled for themselves, according to the word of Jehovah which He commanded Joshua.
28 And Joshua burneth Ai, and maketh it a heap age-during -- a desolation unto this day;
29 and the king of Ai he hath hanged on the tree till even-time, and at the going in of the sun hath Joshua commanded, and they take down his carcase from the tree, and cast it unto the opening of the gate of the city, and raise over it a great heap of stones till this day.
30 Then doth Joshua build an altar to Jehovah, God of Israel, in mount Ebal,
31 as Moses, servant of Jehovah, commanded the sons of Israel, as it is written in the book of the law of Moses -- an altar of whole stones, over which he hath not waved iron -- and they cause to go up upon it burnt-offerings to Jehovah, and sacrifice peace-offerings;
32 and he writeth there on the stones the copy of the law of Moses, which he hath written in the presence of the sons of Israel.
33 And all Israel, and its elders, and authorities, and its judges, are standing on this side and on that of the ark, over-against the priests, the Levites, bearing the ark of the covenant of Jehovah, as well the sojourner as the native, half of them over-against mount Gerizim, and the half of them over-against mount Ebal, as Moses servant of Jehovah commanded to bless the people of Israel at the first.
34 And afterwards he hath proclaimed all the words of the law, the blessing and the reviling, according to all that is written in the book of the law;

Joshua 8:24-34 Meaning and Commentary

INTRODUCTION TO JOSHUA 8

Joshua is encouraged to go up and take Ai, and is directed what method to make use of, Jos 8:1,2; accordingly he set an ambush on the west side of it, and, he and the rest of the army went up before it, Jos 8:3-13; which, when the king of Ai saw, he and all his forces came cut against them, and the Israelites making a feint as if they were beaten, drew on the men of Ai to pursue them, upon which the ambush arose and entered the city and set fire to it, Jos 8:14-19; the smoke of which being observed by Joshua and Israel, they turned back upon the pursuers, and the ambush sallying out of the city behind them, made an entire destruction of them, then slew all the inhabitants, took the spoil, burnt the city, and hanged the king of it, Jos 8:20-29; after this Joshua built an altar at Ebal, wrote the law on stones, and read the blessings and curses in it before all Israel, Jos 8:30-35.

Young's Literal Translation is in the public domain.