“those who are lame.” God is portraying the people as sheep, and in that context, the word “lame” is not only an allusion, but a synecdoche of the part, where “lame” stands for more than just “lame,” it refers to people who are injured or hurt or wounded in any way.
“gather.” Many prophecies speak of the future time when God will gather together the scattered people of Israel and bring them back to their land (see commentary on Jer. 32:37).
“scattered.” This continues the allusion to the people of God being sheep. In other contexts it would be “driven away” or “banished,” but when used of animals “scattered” is the implication (HALOT Hebrew and Aramaic Lexicon of the Old Testament). The NET has “scattered sheep” for clarity.
“I will change their shame into praise and a name in all the earth.” There are two major ways in which this sentence has been translated (and there are also some other variations), and the scholars and translations are divided. Part of it has to do with whether the Hebrew word erets (#0776), refers to “land” (an individual country) or to “earth” (the whole earth). Both meanings are valid, and there are arguments in support of both translations. The two major ways of translating can be seen in the difference between the ESV (“and I will change their shame into praise and renown in all the earth”) and the KJV (“and I will get them praise and fame in every land where they have been put to shame”).
Zephaniah 3:19 is about Christ’s conquest of the earth and the glory of Israel in the Millennial Kingdom. After the Tribulation, Jesus will come and fight the Battle of Armageddon and conquer the earth (Isa. 63:1-6; Rev. 19:11-21). At that time God “deals” with the wicked (Isa. 11:4), and reestablishes the kingdom of Israel (Ezek. 40-48) which will be the glory of the earth; it will be a thing of praise and renown.
Some scholars see this verse in Zephaniah as referring to Judah returning from the Babylonian Captivity, but although many Judeans did return from Babylon, there are a number of reasons why that was not the fulfillment of this prophecy. For one thing, God’s “sheep” had been being scattered for centuries, and this prophecy is more universal than just referring to the Babylonian Captivity. Also, although many Judeans returned back to Judah from Babylon, historical records show that more people stayed in Babylon and Persia than returned, so God’s sheep were not gathered to Israel as they will be in the future. Also, although many Judeans returned to Israel from the Babylonian Captivity, Israel was not the praise and renown of all the earth, the people were disgraced and Judah was in ruins (cp. Neh. 1:3).
[For more on the future Millennial Kingdom, see Appendix 3, “Christ’s Future Kingdom on Earth”].