Localize error message within an explicit class