in helper
def show_date(date) return '' if date.nil? || date==0 l(Time.at(date), :format => :ddate) end
in config/locale/en.yml (for example)
date: formats: ddate: %d.%m.%Y
in helper
def show_date(date) return '' if date.nil? || date==0 l(Time.at(date), :format => :ddate) end
in config/locale/en.yml (for example)
date: formats: ddate: %d.%m.%Y
module I18n::Backend class Simple protected def pluralize(locale, entry, count) return entry unless entry.is_a?(Hash) and count key = :zero if count == 0 && entry.has_key?(:zero) key ||= count == 1 ? :one : (2..4).include?(count) ? :few : :other raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key) entry[key] end end # class end # module