We extend the standard localization theory for function and section spaces
due to Hilton-Mislin-Roitberg and Moller outside the CW category to the case of
compact metric domain in the presence of a grouplike structure. We study
applications in two cases directly generalizing the gauge group of a principal
bundle. We prove an identity for the monoid of fibre-homotopy self-equivalences
of a Hurewicz fibration -- due to Gottlieb and Booth-Heath-Morgan-Piccinini in
the CW category -- in the compact case. This leads to an extended localization
result for this monoid. We also obtain an extended localization theory for
groups of sections of a fibrewise group. We give two applications in rational
homotopy theory.