adds localization for flash messages