wegsperren
to lock away
To lock someone up so that he or she cannot escape, typically in a prison or a closed institution.
Der gefährliche Verbrecher wurde für viele Jahre weggesperrt.
The dangerous criminal was locked away for many years.

to lock away
Loading your saved state.
to lock away
To lock someone up so that he or she cannot escape, typically in a prison or a closed institution.
Der gefährliche Verbrecher wurde für viele Jahre weggesperrt.
The dangerous criminal was locked away for many years.

'Wegsperren' (to lock away) is a separable verb. The prefix 'weg-' goes at the end in a main clause. In subordinate clauses and in the infinitive with 'zu', the verb stays together.
Er sperrt das Geld immer weg.
He always locks the money away.
The verb consists of the prefix 'weg-' and the verb 'sperren' (to lock/block). The prefix 'weg-' emphasizes the idea of removing something or hiding it in another place.
Bitte sperr die Süßigkeiten weg, sonst esse ich alles auf.
Please lock the sweets away, otherwise I'll eat them all.
You can tell whether a person or an object is meant from the accusative object. If it is a person, it means to lock someone up. If it is an object, it means to store it safely.
Man muss den Täter für immer wegsperren.
They need to lock the offender away forever.
When speaking about people, 'wegsperren' (to lock away) is a very direct and colloquial formulation. It emphasizes the intention to remove someone from society.
Die Nachbarn sagten, man sollte solche Leute einfach wegsperren.
The neighbors said that people like that should simply be locked away.
to lock in / include / enclose
'einschließen' and 'wegsperren' can both mean that someone or something stays behind a locked door or in a safe place. 'einschließen' describes more the act of locking something or someone in: afterward, the person or thing can no longer get out. It can also be neutral or happen by accident. 'wegsperren' sounds stronger and often more negative. With people, it quickly makes you think of prison or a closed institution. With things, it means that you deliberately put them away securely so that no one can use them.

Nach dem Unterricht sperrt die Lehrerin die teuren Geräte im Schrank weg.
After class, the teacher locks the expensive equipment away in the cupboard.
Aus Versehen habe ich den Schlüssel in der Küche eingeschlossen.
I accidentally locked the key in the kitchen.