YOU SAID:
She was talking through her hat.
INTO JAPANESE
彼女は彼女の帽子を話していた。
BACK INTO ENGLISH
She was talking in her hat.
INTO JAPANESE
彼女は彼女の帽子に話していた。
BACK INTO ENGLISH
She was talking to her hat.
INTO JAPANESE
彼女は彼女の帽子に話していた。
BACK INTO ENGLISH
She was talking to her hat.
That didn't even make that much sense in English.