public
Fork of mattetti/i18n
Description: Basic internationalization(i18n) library for Ruby
Homepage:
Clone URL: git://github.com/svenfuchs/i18n.git
i18n /
name age message
file .gitignore Mon Jun 23 08:22:07 -0700 2008 started adding rdoc formatting [joshmh]
file CHANGELOG.textile Thu Dec 10 15:18:35 -0800 2009 update changelog [clemens]
file MIT-LICENSE Mon Jun 23 08:02:05 -0700 2008 renamed license file and added minimum info to ... [svenfuchs]
file README.textile Sat Dec 05 08:45:43 -0800 2009 add Mathias to the contributors list [svenfuchs]
file Rakefile Thu Dec 10 15:17:16 -0800 2009 add vendor directory to gemspec [clemens]
file VERSION Thu Dec 10 14:57:58 -0800 2009 Version bump to 0.3.1 [clemens]
file contributors.txt Sat Dec 05 08:45:43 -0800 2009 add Mathias to the contributors list [svenfuchs]
file i18n.gemspec Thu Dec 10 15:18:44 -0800 2009 version bump to 0.3.1 [clemens]
file init.rb Sat Nov 21 04:58:00 -0800 2009 Add an ActiveRecordMissing extension that store... [m4ssive]
directory lib/ Sat Dec 05 08:40:33 -0800 2009 make sure the ActiveRecord backend works with c... [svenfuchs]
directory test/ Sat Dec 05 08:40:33 -0800 2009 restructure tests: all testcases are now in the... [svenfuchs]
directory vendor/ Sat Jul 18 05:16:46 -0700 2009 experimental gettext support [svenfuchs]
README.textile

Ruby I18n

Ruby Internationalization and localization solution.

Features:

  • translation and localization
  • interpolation of values to translations (Ruby 1.9 compatible syntax)
  • pluralization (CLDR compatible)
  • flexible defaults
  • bulk lookup
  • lambdas as translation data
  • custom key/scope separator
  • custom exception handlers
  • extensible architecture with a swappable backend

Pluggable features:

  • Cache
  • Pluralization: lambda pluralizers stored as translation data
  • Locale fallbacks, RFC4647 compliant (optionally: RFC4646 locale validation)
  • Gettext support
  • Translation metadata

Alternative backends:

  • Chain
  • ActiveRecord (optionally: ActiveRecordMissing)

For more information and lots of resources see: http://rails-i18n.org/wiki

Installation

gem install i18n

Installation on Rails < 2.3.5 (deprecated)

Up to version 2.3.4 Rails will not accept i18n gems > 0.1.3. There is an unpacked
gem inside of active_support/lib/vendor which gets loaded unless gem ‘i18n’, ‘~> 0.1.3’.
This requirement is relaxed in 6da03653

The new i18n gem can be loaded from vendor/plugins like this:

def reload_i18n! raise “Move to i18n version 0.2.0 or greater” if Rails.version > “2.3.4” $:.grep(/i18n/).each { |path| $:.delete(path) } I18n::Backend.send :remove_const, “Simple” $: << Rails.root.join(‘vendor’, ‘plugins’, ‘i18n’, ‘lib’).to_s end

Then you can `reload_i18n!` inside an i18n initializer.

Authors

Contributors

  • Akira Matsuda
  • Andrew Briening
  • Clemens Kofler
  • Frederick Cheung
  • Jeremy Kemper
  • José Valim
  • Lawrence Pit
  • Luca Guidi
  • M4SSIVE
  • Marko Seppae
  • Mathias Meyer
  • Michael Lang
  • Theo Cushion
  • Yaroslav Markin

License

MIT License. See the included MIT-LICENCE file.