Craig Shakespeare has been named as Leicester's manager until the end of the season, with the caretaker manager replacing the sacked Claudio Ranieri.