I'm currently working my way through A Connecticut Yankee, again.  I'm
puzzled as to why Mark Twain made such large use of Sandy believing that
hogs were princesses and the swineherds ogres.  Did he ever mention an
interest in the possible mass deliriums of the Middle Ages?  It's not as
if she thought they had been enchanted and made to look like hogs.  They
only looked like hogs to Hank and the ogres as swineherds only to Hank.

Twain does not use this device anywhere else in the story, that I'm
aware of.