method
translate
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
Register or
log in
to add new notes.
Vidmantas -
January 11, 2010 - (>= v2.2.1)
![Default_avatar_30](https://www.gravatar.com/avatar/6c85cc2920423530609e7d80d6b2d17f?default=http://apidock.com/images/default_avatar_30.png&size=30)
2 thanks
Default fallback
You can specifly :default option which is useful when the translation is not found. For example:
t(:this_translation_doesnt_exist, :default => 'Ooops!') # => Ooops!
Or even any number of “fallbacks” - the first not nil is returned:
t(:missing, :default => [:missing_too, :existing, 'Sad panda']) # => :existing translation
Good introduction to Rails I18n is http://guides.rubyonrails.org/i18n.html