Here are some options:
If you mean "to be a pig" in the sense of being messy or gluttonous:
* Être un cochon: This is the most literal translation and means "to be a pig."
* Être un goinfre: This means "to be a glutton" and is a more common expression.
* Être un sale gosse: This literally means "to be a dirty kid" and implies being messy or untidy.
If you mean "to act like a pig" in a specific situation:
* Se comporter comme un cochon: This means "to behave like a pig."
* Manger comme un cochon: This means "to eat like a pig."
If you want to use a more neutral expression that doesn't have negative connotations:
* Être un animal: This means "to be an animal" and can be used in a playful way.
The best translation will depend on the specific context and the intended meaning.