/usr/share/doc/ruby-locale/examples/rack/locale_rack.rb is in ruby-locale 2.1.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 | require 'locale'
Locale.init(:driver => :cgi)
module Locale::Rack
def init_locale(env, req)
Locale.set_request([req["lang"]], [req.cookies["lang"]],
env["HTTP_ACCEPT_LANGUAGE"],
env["HTTP_ACCEPT_CHARSET"])
end
end
|