This verse has a command followed by the reason for the command. If your language requires the reason to precede the command: "Because of what Yahweh has done for you, you righteous people, be glad and give thanks when you remember his holiness."
This idiom means to be glad because of what Yahweh has done. Alternate translation: "Be glad because of what Yahweh has done" (See: [[rc://en/ta/man/translate/figs-idiom]])
Possible meanings are 1) "when you remember how holy he is" or 2) "to his holy name," a metonym for "to him." (See: [[rc://en/ta/man/translate/figs-metonymy]])