GithubHelp home page GithubHelp logo

scambra / locale_rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mutoh/locale_rails

1.0 2.0 1.0 213 KB

Ruby on Rails (>=2.2) localization support(auto locale detection, localized caches, views, routes, etc...) with Ruby-Locale.

Home Page: http://www.rubyforge.org/projects/locale

License: Other

JavaScript 0.69% Ruby 99.31%

locale_rails's 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>

locale_rails's People

Contributors

mutoh avatar pupeno avatar schmidt avatar

Stargazers

Sergio Cambra avatar

Watchers

Sergio Cambra avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.