The meaning
>Talk nonsense, especially on a subject that one professes to be knowledgeable about but in fact is ignorant of.
Nothing of what he said made sense – he was talking through his hat.
Talking Through Your Hat © cjtrevisan.com
Etymology
> This began life in the USA, in the late 19th century, with a slightly different meaning from the present one. It then meant to bluster (menacer). It would be nice to say that this idiomatic expression make reference to someone using a hat to disguise its voice, meanwhile I cannot find any explanation close to that!
The only practice that comes close to a possible origin could come from «topping», in the UK parliament. To be allowed to make a «point of order», which is an interruption to a previous speech in order to query something that had been said. MPs had to be seated and covered. That is, seated and wearing a hat. Topping was the name given to «talking out» a bill! Having made a point of order and while wearing a top hat, an MP couldn’t be interrupted and could continue talking for as long as he wished. Naturally, as these speeches often lasted hours, they were frequently filled with rambling nonsense.
Unfortunately, although the link is plausible, I have not found documentary evidence that links this practice with talking through one’s hat. It also seems unlikely that such a practice of top-hatted Victorian gentlemen in the UK parliament would have crossed the Atlantic. Much more likely that the phrase originated in the USA and the meaning changed slightly over time.
Wrong translation
> Parler à travers son chapeau
Correct French idiom
> Parler à tort et à travers