Rare-earth doped glasses and light managing in solar cells