localization-middleware
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:
= 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 (c) 2012 kot-begemot. See LICENSE.txt for
further details.


本源码包内暂不包含可直接显示的源代码文件,请下载源码包。