Accept strings as well as functions for localization