Yes, this literary device is called “dialect.” Dialect is in fact a type of language, which is used by people belonging to a particular region, district or class. It uses its own grammar, vocabulary, spellings, words, and pronunciation. So, the poet must have incorporated dialect to mix up two languages in that poem, which you are referring here.