No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.document
.gitignore
.rvmrc
.travis.yml
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
VERSION
localization-middleware.gemspec

README.rdoc

localization-middleware

The gem that allows to manipulate I18n.locale via url.

Usage

  • First install the gem

    With Bundle

    #Gemfile
    gem "padrino-localization"
    
    #irb
    bundle install

    or with gem

    gem install padrino-localization
  • Now it should be added to middleware(Padrino example)

    Padrino.use(Localization::Middleware, __DEFINE_HERE_LOCALES__)
    
    # config/apps.rb
    Padrino.use(Localization::Middleware, %w(en ru))
  • And that's it. You now can access your application via /page_path, /en/page_path or /ru/page_path

(in case you specified only tow locales: russian ang english). If no locale was defined, then the I18n.default_locale will be used.

Copyright

Copyright © 2012 kot-begemot. See LICENSE.txt for further details.