Sha256: 85e3ea8a06022bb07077a773fccdc841462afefb192bb2d50be2207ff4b1bccf

Contents?: true

Size: 241 Bytes

Versions: 108

Compression:

Stored size: 241 Bytes

Contents

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

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

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
web_translate_it-2.6.3 examples/locale.rb
web_translate_it-2.6.3.pre1 examples/locale.rb
web_translate_it-2.6.2 examples/locale.rb
web_translate_it-2.6.1 examples/locale.rb
web_translate_it-2.6.0 examples/locale.rb
web_translate_it-2.5.4 examples/locale.rb
web_translate_it-2.5.3 examples/locale.rb
web_translate_it-2.5.2 examples/locale.rb
web_translate_it-2.5.1 examples/locale.rb
web_translate_it-2.5.0 examples/locale.rb
web_translate_it-2.4.12 examples/locale.rb
web_translate_it-2.4.11 examples/locale.rb
web_translate_it-2.4.10 examples/locale.rb
web_translate_it-2.4.9 examples/locale.rb
web_translate_it-2.4.8 examples/locale.rb
web_translate_it-2.4.7 examples/locale.rb
web_translate_it-2.4.6 examples/locale.rb
web_translate_it-2.4.5 examples/locale.rb
web_translate_it-2.4.4 examples/locale.rb
web_translate_it-2.4.3 examples/locale.rb