Sonja Morgan better learn how to say "broke as a joke" in French -- she just lost her fabulous St. Tropez villa in her bankruptcy case ... and a bunch of pigs nearly screwed the deal.
The trustee in her longstanding bankruptcy sold off the Riviera vacay spot for $5.7 million, according to court docs obtained by TMZ.
The "Real Housewives of New York" star has been telling people SHE was selling to be financially responsible, but truth is the court-appointed trustee sold it ... and Sonja had no say in the deal.
Sonja had said she was listing it for $8 million -- but the trustee sold it for much less, partly because the place wasn't easy to unload. According to the docs, the trustee ran into several issues ... including wild boars destroying the landscaping back in January.
French wild pigs, dude. Zut alors!