Hello and welcome to eHealth Forum!
If your two year old bumped his head about two weeks ago and the swelling is still persisting as a hard noticeable lump, then please consult a doctor.
Center of head in a small child is a very vulnerable place because the skull bones have not yet approximated and closed the gap. An injury or bump can cause bleeding and hematoma (localized collection of blood) formation.
This lump should not be ignored. It can just be a contusion or it can be something serious. Hope this helps. Take care!