#16 Improve localization with error handling