Shared ground
These lines widen the psalm’s focus from one person’s gratitude to a public, international response. The explicit claim is that “all the kings of the earth” give thanks to Yahweh, and that their thanks is linked to hearing Yahweh’s own spoken words (v. 4). The passage then intensifies the picture: these rulers also sing, and what they sing about is “the ways of Yahweh” (v. 5).
The text also gives an explicit reason for this praise: Yahweh’s glory is great (v. 5). In other words, Yahweh’s displayed honor is presented as sufficient explanation for why even top authorities would join the chorus.
Where interpretation differs
One question is whether “will give thanks” is a prediction (this will happen) or a poetic wish/hope (may it happen). Both readings fit the Hebrew verb form and the psalm’s poetic style.
Another question is how broadly to take “all the kings of the earth.” Some read it as a sweeping, near-universal picture of world rulers acknowledging Yahweh. Others read it as a stylized way of saying “even the greatest leaders,” without requiring every single king in history.
A related question is what it means that they “have heard the words of your mouth.” Some take this as direct divine speech reaching rulers in some way (for example, through Yahweh’s public acts and proclamations). Others think it refers to kings hearing about Yahweh’s words through Israel’s witness—still Yahweh’s words, but mediated through proclamation.
Why the disagreement exists
The wording is broad (“all the kings”), and biblical poetry often uses universal language to express the full scope of God’s reputation. Also, the verb can naturally function either as future (“they will…”) or as a jussive-like wish (“let them…”). Finally, the psalm does not spell out the historical mechanism by which rulers “hear,” leaving room for different reconstructions.
What this passage clearly contributes
It presents praise as a reasonable response to divine speech and divine reputation (v. 4), not merely to political success or human power. It also connects Yahweh’s “ways” (how he acts and governs) with Yahweh’s “glory” (his displayed honor): rulers praise not only who Yahweh is, but how he operates in the world (v. 5). The passage therefore pushes the psalm’s thanksgiving outward, imagining Yahweh’s renown reaching the highest public authorities.