How can I18n be used in Action::View::Helpers without Rails
Posted
by phvalues
on Stack Overflow
See other posts from Stack Overflow
or by phvalues
Published on 2010-04-15T15:09:17Z
Indexed on
2010/04/15
15:13 UTC
Read the original article
Hit count: 470
Given the code below, how could I use the I18n lib to get the result back in an other language than English?
require 'action_view'
include ActionView::Helpers::DateHelper
t_0 = Time.now
span = 1.week
puts "Now: #{ t_0 } (#{t_0.to_f})"
puts distance_of_time_in_words_to_now Time.at( t_0 + rand( span ) )
© Stack Overflow or respective owner