In English this saying reminds you not to talk carelessly because you don’t know who is listening. It originated during WWII when it was better not to reveal anything because the location could be communicated to the enemy by a spy.
Nowadays it is used to describe people who talk too much and whose talking can create troubles, open your mouth to talk too much can make you appear ridiculous.