Added a rescue block in `name_for_locale()` to ensure the application doesn't crash in case it receives an invalid locale.