* "To swear" could be translated by "to formally promise" or "to pledge" or "to commit to do something."
* Other ways to translate "swear by my name" could include, "make a promise using my name to confirm it." To "swear by heaven and earth" could be translated as, "promise to do something, stating that heaven and earth will confirm it."
* Make sure the translation of "swear" or "oath" does not refer to cursing. In the Bible it does not have that meaning.