Sha256: fa4406504f25eb91e5754fcf4c8eecefade94482cc7a5b9b3c50746271dfabbc

Contents?: true

Size: 239 Bytes

Versions: 15

Compression:

Stored size: 239 Bytes

Contents

class Locale
  def initialize(app)
    @app = app
  end

  def call(env)
    req = Rack::Request.new(env)
    I18n.locale = req.params['locale']
    status, headers, response = @app.call(env)
    [status, headers, response.body]
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
wti_gettext_i18n_rails-1.0.3 examples/locale.rb
wti_gettext_i18n_rails-1.0.2 examples/locale.rb
wti_gettext_i18n_rails-1.0.1 examples/locale.rb
wti_gettext_i18n_rails-1.0.0 examples/locale.rb
web_translate_it-1.5.2 examples/locale.rb
web_translate_it-1.5.1 examples/locale.rb
web_translate_it-1.5.0 examples/locale.rb
web_translate_it-1.4.7 examples/locale.rb
web_translate_it-1.4.6 examples/locale.rb
web_translate_it-1.4.5 examples/locale.rb
web_translate_it-1.4.4 examples/locale.rb
web_translate_it-1.4.3 examples/locale.rb
web_translate_it-1.4.2 examples/locale.rb
web_translate_it-1.4.1 examples/locale.rb
web_translate_it-1.4.0 examples/locale.rb