method

localize

localize(*args)
public

Delegates to I18n.localize with no additional functionality.

See http://rubydoc.info/github/svenfuchs/i18n/master/I18n/Backend/Base:localize for more information.

2Notes

nil Argument Raises An I18n::ArgumentError

sshaw · Apr 22, 20101 thank

You might want to do this:

module ActionView module Helpers module TranslationHelper def localize(*args) #Avoid I18n::ArgumentError for nil values I18n.localize(*args) unless args.first.nil? end # l() still points at old definition alias l localize end end end

formating date

ziemek · Mar 14, 2011

I18n.l Time.now, :format => "%e %B"

http://snippets.dzone.com/posts/show/2255