• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mutoh/locale_rails: Ruby on Rails (>=2.2) localization support(auto locale de ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mutoh/locale_rails

开源软件地址(OpenSource Url):

https://github.com/mutoh/locale_rails

开源编程语言(OpenSource Language):

Ruby 99.3%

开源软件介绍(OpenSource Introduction):

Ruby-Locale for Ruby on Rails

This library provides some Rails localized functions.

This is useful with Rails i18n backends which doesn't have auto-detection and some other features includes this library.

Features for Ruby on Rails

  • Auto-Detect the locales from the WWW browser

  • Action/Fragment caching

  • Separated Localized View template file

  • Localized Routes

  • I18n.t fallback to localized message candidates.

Website

Requirements

Install

  • gem: ($ su)

    # gem install locale_rails
    

Usage

config/environment.rb

Rails::Initializer.run do |config|
  :
  :
  config.gem 'locale'
  config.gem 'locale_rails'
end

config/initializer/locale.rb

# Tell the I18n library where to find your translations
I18n.supported_locales = ["ja", "en"]
I18n.default_locale = "ja"

Support matrix

  • locale_rails-2.0.6 - rails-2.3.2,2.3.3,2.3.4,2.3.5

  • locale_rails-2.0.5 - rails-2.3.2,2.3.3,2.3.4

  • locale_rails-2.0.4 - rails-2.3.2

  • locale_rails-2.0.3 - rails-2.3.2

  • locale_rails-2.0.2 - rails-2.3.2

  • locale_rails-2.0.1 - rails-2.3.2

  • locale_rails-2.0.0 - rails-2.3.2

  • locale_rails-0.1.0 - rails-2.1.x

Tested Ruby version:

  • locale_rails-2.0.6 - 1.8.7-p249, 1.9.1-p378

License

This program is licenced under the same licence as Ruby(See COPYING) or LGPL(Lesser General Public License: www.gnu.org/licenses/lgpl-3.0.txt).

Maintainer

Masao Mutoh <mutomasa at gmail.com>




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
ttag-org/babel-plugin-ttag: ttag - library for extracting and resolving gettext ...发布时间:2022-08-16
下一篇:
mustafasaaed/Angular-Localization发布时间:2022-08-16
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap