
der Riegel
bolt
A mechanical component, usually made of metal or wood, used to lock a door, gate, or window by being slid into an opening intended for it.
Er schob den schweren Riegel vor die Haustür.
He slid the heavy bolt across the front door.
bolt / bar
Loading your saved state.

bolt
A mechanical component, usually made of metal or wood, used to lock a door, gate, or window by being slid into an opening intended for it.
Er schob den schweren Riegel vor die Haustür.
He slid the heavy bolt across the front door.

bar
An elongated, rectangular piece of a solid substance, especially chocolate, granola, or soap.
Für den kleinen Hunger zwischendurch habe ich immer einen Müsliriegel dabei.
For a small snack between meals, I always have a granola bar with me.

to put a stop to something
An idiom meaning to put a stop to or end an unwanted development or action.
Die Polizei will der Drogenkriminalität im Park einen Riegel vorschieben.
The police want to put a stop to drug-related crime in the park.

bar
In gymnastics, a term for the rail of a piece of gymnastic equipment, especially the parallel bars or horizontal bar.
Die Turnerin schwang sich elegant von einem Riegel zum anderen.
The gymnast swung elegantly from one bar to the other.
You can recognize the meaning of 'Riegel' from the context. If it is about doors, it means the locking bolt. With food, it refers to a chocolate bar or granola bar. In a sports context, it means part of a piece of gymnastic equipment.
Schieb bitte den Riegel vor, bevor du schlafen gehst.
Please slide the bolt across before you go to sleep.
In the meaning of 'food item', 'Riegel' is almost always part of a compound word. The most common are 'Schokoriegel' (chocolate bar), 'Müsliriegel' (granola bar), 'Proteinriegel' (protein bar), and 'Energieriegel' (energy bar).
Nach dem Sport esse ich oft einen Proteinriegel.
After exercising, I often eat a protein bar.
The idiom 'einer Sache einen Riegel vorschieben' (to put a stop to something) has a fixed structure. The thing that is to be stopped is always in the dative.
Die Stadt will der illegalen Müllentsorgung einen Riegel vorschieben.
The city wants to put a stop to illegal waste disposal.
When the door lock is meant, the typical verbs are 'vorschieben' (to slide across / lock) and 'zurückziehen' (to pull back / open).
Aus Sicherheitsgründen schob sie den Riegel vor.
For safety reasons, she slid the bolt across.
board / bar / food bank
A Tafel Schokolade is flat and rectangular and is usually broken into several pieces. A Riegel, by contrast, is elongated and already shaped as an individual portion. Tafel is therefore used for the larger, flat form, while Riegel refers to the convenient single portion.

Für die Pause kauft Lea einen einzelnen Riegel Schokolade.
Lea is buying a single chocolate bar for her break.
Für den Kuchen kauft Lea eine ganze Tafel Schokolade.
Lea is buying a whole chocolate bar for the cake.