Idioms are words, phrases, or expressions that are usually metaphorical, their meaning cannot be taken literally so you need to memorize them as a whole.
Some idioms come from literature; some come from the movies or from the "street" language. For example, idiom "break a leg", meaning "good luck" is a well known idiom in theatre. It comes from a superstitious belief that saying "good luck" to actors before their performance brings "bad luck".
Idioms are difficult to translate because they have a specific cultural background but they can be translated with their equivalents in a specific language. Here are some examples of how we can translate them into Croatian.
wear one's heart on the sleeve
bring home the bacon
have a cake and eat it too
cool as a cucumber
piece of cake
go with the flow
make a mountain out of a molehill
once in a bluemoon
bad-mouth
nositi srce na dlanu
zarađivati kruh
i ovce i novce
hladan k'o špricer
mačji kašalj
kud svi, tud i mali Mujo
od muhe praviti slona
na sveto nigdarjevo
olajavati
Can you think of Croatian equivalents for these idioms:
spill the beans
kick the bucket
head over heels
live from hand to mouth
out of the woods
tight-fisted
keep one's fingers crossed
fit like a glove