The usual German words for "flag" are die Fahne or die Flagge, and they're used in a number of idiomatic expressions, some of which parallel those in English.

BANNER PLACEHOLDER

Wir mussten die Flagge streichen. We had to strike the flag.

The phrase die Flagge streichen can be used in the literal sense of striking or taking down a flag, but is more often used figuratively to mean "to give up," as in "We had to give up." Note that the verb streichen also means "to paint," but that won't be the case here!

This too is a literal translation, as the story is about an army surrendering, but as in English, "to wave a white flag" is also often used figuratively to mean "to give up."

Wir haben unsere Fahnen nach dem Wind gedreht. We have changed according to the circumstances.

Literally translated, this would read "We've turned our flags to the wind," but is used figuratively to mean that one has followed popular opinion or adapted according to the circumstances. It's similar to the English expression "whichever way the wind blows" or "to see which way the wind is blowing." As in English, the phrase can also be used as a negative critique of somebody being opportunistic.

One of the more common idiomatic uses of die Fahne can sound very strange to English speakers:

You've probably gathered that they aren't literally talking about "having a flag." The phrase eine Fahne haben means "to have bad breath" and is usually associated with the smell of alcohol. The question Hast du eine Fahne? is a way of asking somebody if they've been drinking alcohol.

BANNER PLACEHOLDER

Further LearningLook up the words die Flagge and die Fahne on Yabla German to see them used both literally and figuratively in a real-world context.