LET'S GET IT STRAIGHT, SHALL WE!
Mark 15:34
And at the ninth hour Jesus cried out in a loud voice, "Eloi, Eloi, lama sabachthani?"—which means, "My God, my God, why have you forsaken me?"
...)
Yes, this attempt to transliterate is an error in the gospels. One can tell by two elements: first, there is no form, either in Hebrew (the language of formal prayer) or Aramaic (the language of informal prayer) of
Eloi. The Hebrew form is
Elohai. The Aramaic form
Elahi, but is rare, outside of one place: the Targumim, the Aramaic translations of the Tanakh. The second element is that
lama is Hebrew, but
shevaktani is Aramaic: the two languages are never mixed within the same sentence in that way in any kind of prayer.
Now, if we translate
shevaktani back into Hebrew, we have
azavtani. And if we presume that
Eloi is a Greek scribal error for the Hebrew
Eli, then what we have is
Eli Eli lama azavtani, ("my God, my God, why have you forsaken me") which is a part of the second verse of Psalm 22 (1. To the choirmaster, [to be sung] upon the dawn: a song of David. 2.
My God, my God, why have you forsaken me? You are far from my salvation, from the words of my screaming.....).
This verse, in the Aramaic Targum (translation) is
Elahi Elahi m'tol mah shevaktani. What seems clear is that the Greek author of the gospel, being unclear or uneducated on the differences between Hebrew and Aramaic, original and Targum, simply jumbled the two together. Either that, or there were two original oral or ur-written traditions, one of which had Jesus reciting Ps. 22 in the original (as he almost certainly would have done-- any moderately educated person knew the psalms in Hebrew. The Targumim of the psalms were not for use in recitation, but for the common people, who understood little Hebrew, to be able to study the meaning of the psalms in greater depth), the other having Jesus recite in Aramaic. In redacting the final gospel text, the author simply merged the two recitations without care for preserving the integrity of the language.
For that matter, it is a common idiom in Jewish usage-- prevalent since at least Second Temple days, if not before, and continuing unto this very day-- that the first line or word of a psalm or prayer is used as a metonymy: we say that someone recited
Ashrei, for example, and we mean that he recited Ps. 145, to which it is custom to append at the beginning a verse from Ps. 84 and a verse from Ps. 144, both of which begin with the word
ashrei ("happy is the one..."). Yet all understand that what is meant is not that so-and-so recited the word, or even the verse, but the entirety of the psalm, with its traditional accompanying verses. This idiomatic usage arose because originally, Jews did not number the chapters of Psalms, nor did they divide the rest of the Tanakh into chapters and verses: those ideas were introduced by Christians, much later. Jews used this kind of metonymy in place of chapter and verse references. So by that same token, I would presume that the pre-gospel original narrative presumed that all would understand that by citing this verse, what was meant was that Jesus recited the entirety of Ps. 22.