That's too complex, maybe something like this:
@language = Language.find_by_locale(params[:locale]).code3 rescue 'ENG' 
```
BTW, why is it @ variable? And why do we need @catalogs as well?