Localization on certain Grothendieck categories