github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ai / r18n

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 51
    • 10
  • Source
  • Commits
  • Network (10)
  • Issues (0)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (11)
    • 0.4.1
    • 0.4
    • 0.3.2
    • 0.3.1
    • 0.3
    • 0.2.3
    • 0.2.2
    • 0.2.1
    • 0.2
    • 0.1.1
    • 0.1
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

I18n tool to translate your Ruby application. — Read more

  cancel

http://r18n.rubyforge.org/

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Add method to get translation keys 
ai (author)
Sat Jan 16 01:08:11 -0800 2010
commit  5eebee40bcc67a12fcf26c4c4ae3140a1d32eb21
tree    0194b459c3b143ce25dc4fbe4ebccfd0a8f9ada1
parent  f85d357a45e6aaa8eb9b4f901c06e833cab94089
r18n /
name age
history
message
file .gitignore Fri Dec 18 05:07:44 -0800 2009 Remove SQLite DBs from repo [ai]
file README.rdoc Sun Jan 03 07:59:35 -0800 2010 Fix README to use common helpers [ai]
file Rakefile Wed Dec 16 05:44:18 -0800 2009 Add dir for r18n-rails [ai]
directory benchmark/ Wed Dec 30 05:23:02 -0800 2009 Update benchmark [ai]
directory r18n-core/ Sat Jan 16 01:08:11 -0800 2010 Add method to get translation keys [ai]
directory r18n-desktop/ Sun Jan 03 07:51:51 -0800 2010 Add mixin with t and l helper to desktop plugin [ai]
directory r18n-rails-api/ Fri Jan 08 13:52:30 -0800 2010 Transform YAML private types to Typed [ai]
directory r18n-rails/ Sat Dec 19 14:08:19 -0800 2009 Small fixes in READMEs [ai]
directory r18n.rubyforge.org/ Mon Jan 04 20:39:56 -0800 2010 Fxi headers margin on web site [ai]
directory sinatra-r18n/ Sun Jan 03 07:51:51 -0800 2010 Add mixin with t and l helper to desktop plugin [ai]
README.rdoc

R18n

R18n is a i18n tool to translate your Ruby application to several languages. It contain core gem and out-of-box wrapper plugins for frameworks or environments (Rails, Sinatra, Merb, desktop).

For more features description and tutorial see r18n-core dir. For special How To see plugins dirs for your environment.

Merb R18n plugin is maintained by teamon: github.com/teamon/merb-i18n.

R18n Features

  • Nice Ruby-style syntax.
  • Filters.
  • Flexible locales.
  • Custom translations loaders.
  • Translation support for any classes.
  • Time and number localization.
  • Several user language support.

Small Example

i18n/en.yml:

  user:
    edit: Edit user
    name: User name is %1
    count: !!pl
      1: There is 1 user
      n: There are %1 users

example.rb:

  t.user.edit         #=> "Edit user"
  t.user.name('John') #=> "User name is John"
  t.user.count(5)     #=> "There are 5 users"

  t.not.exists | 'default' #=> "default"
  t.not.exists.translated? #=> false

  l Time.now         #=> "03/01/2010 18:54"
  l Time.now, :human #=> "now"
  l Time.now, :full  #=> "3rd of January, 2010 18:54"
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server