lib/sinatra/support/i18nsupport.rb in sinatra-support-1.0.1 vs lib/sinatra/support/i18nsupport.rb in sinatra-support-1.0.2

- old
+ new

@@ -6,23 +6,24 @@ # register Sinatra::I18nSupport # load_locales './config/locales' # set :default_locale, 'fr' # Optional; defaults to 'en' # end # -# Be sure that you have the +I18n+ gem. +# Be sure that you have the +I18n+ gem. Use +gem install i18n+, or if you're +# using Bundler: # # # Gemfile # gem "i18n" # -# (or +gem install i18n+) -# # Then put your locale YAML files into +./config/locales+ (whatever path you # use for {#load_locales}: # # # config/locales/en.yml # en: # an_article: "An article" +# create: "Create" +# delete: "Delete" # # == Helpers # # === {Helpers#t t} - Translates something. # @@ -65,24 +66,23 @@ # end # # == Locale files # # This gem does not ship with default options for time, date and such. -# You may want to get those from: -# -# https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale +# You may want to get those from the Rails-I18n project: +# https://github.com/svenfuchs/rails-i18n/tree/master/rails/locale # # == Using a different backend # # Instead of calling {#load_locales}, just load the right I18n backend # using the I18n gem. # -# You can also just use I18n.store_translations if you still want to use +# You can also just use +I18n.store_translations+ if you still want to use # the default simple I18n backend. # # == Settings # -# [+default_locale+] The locale to use by default. Defaults to +"en"+. +# [+default_locale+] The locale to use by default. Defaults to +en+. # module Sinatra::I18nSupport def self.registered(app) require 'i18n' app.set :default_locale, 'en'