r18n /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Dec 18 05:07:44 -0800 2009 | |
| |
README.rdoc | Sun Jan 03 07:59:35 -0800 2010 | |
| |
Rakefile | Wed Dec 16 05:44:18 -0800 2009 | |
| |
benchmark/ | Wed Dec 30 05:23:02 -0800 2009 | |
| |
r18n-core/ | Sat Jan 16 01:08:11 -0800 2010 | |
| |
r18n-desktop/ | Sun Jan 03 07:51:51 -0800 2010 | |
| |
r18n-rails-api/ | Fri Jan 08 13:52:30 -0800 2010 | |
| |
r18n-rails/ | Sat Dec 19 14:08:19 -0800 2009 | |
| |
r18n.rubyforge.org/ | Mon Jan 04 20:39:56 -0800 2010 | |
| |
sinatra-r18n/ | Sun Jan 03 07:51:51 -0800 2010 |
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"
