Liability for perjury is governed by the language of the applicable perjury statute and the related case law, not by the language of the oath itself. The situation in the case of contempt of court is similar.
For legal purposes, you either swear or affirm something, or you don't. It is a binary matter that doesn't depend upon the exact language of the oath or affirmation made.
MyMany court systems expressly permit a court to administer an oath or affirmation with non-standard or simplified language to children or people who do not speak the court's usual language. Also the option to swear or affirm likewise usually addresses any potential discomfort on religious grounds with the particular language of a standard witness oath.