Skip to content

Instantly share code, notes, and snippets.

@mytrile
Created June 21, 2009 12:39
Show Gist options
  • Save mytrile/133498 to your computer and use it in GitHub Desktop.
Save mytrile/133498 to your computer and use it in GitHub Desktop.
# application_controller.rb
init_gettext "kick"
GetText.locale = "bg"
# ....
# environment.rb
# ...
config.gem "locale"
config.gem "locale_rails"
config.gem "gettext"
config.gem "gettext_activerecord"
config.gem "gettext_rails"
# ...
# index.html.erb
# ...
<%= distance_of_time_in_words(Time.now, Time.now + 50.minutes %>
# ...
# ...
# and the output is
translation missing: bg, datetime, distance_in_words, about_x_hours
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment