The word "vain" seems to be two words. "Vain" as in "vanity" is one. But remember the Commandment in the Bible "Though shalt not take the name of the Lord in vain." I could not find it in the German Bible, but I remember having read that the word was "wehen" related to the word "wind" but meaning swearing, cursing, profanity. Perhaps someone more proficient in German can help me with this.

vain
adj.
OFr < L vanus, empty, vain: see WANT
1 having no real value or significance; worthless, empty, idle, hollow, etc. !vain pomp"
2 without force or effect; futile, fruitless, unprofitable, unavailing, etc. !a vain endeavor"
3 having or showing an excessively high regard for one‘s self, looks, possessions, ability, etc.; indulging in or resulting from personal vanity; conceited
4 [Archaic] lacking in sense; foolish
in vain
1 fruitlessly; vainly
2 lightly; profanely; irreverently
vain4ness
n.
SYN.—vain, in this connection, applies to that which has little or no real value, worth, or meaning [vain studies]; idle refers to that which is baseless or worthless because it can never be realized [idle hopes, idle talk]; empty and hollow are used of that which only appears to be genuine, sincere, worthwhile, etc. [empty threats, hollow pleasures]; otiose applies to that which has no real purpose or function and is therefore useless or superfluous [otiose remarks] See also FUTILE