There are multiple definitions - click on the translation that matches your context.

legalnie

przysłówek

full

legally

adverb

Definitions of legally

English

done according to the law

The age of consent is the age at which you can legally have sex.