Framework for localization