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

iain / i18n_label

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 61
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
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.

Adds translated form labels to Rails 2.2 — Read more

  cancel

http://iain.nl/

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

This URL has Read+Write access

typo 
iain (author)
Sat Sep 13 15:29:38 -0700 2008
commit  9f820e24ec60c131524d9be707ba55610ae25f69
tree    9e4327d936dd1b8546859bc43f04a8fe530a20a0
parent  44b1004ff7bd4e5d5c4cfcf236e15e3974ab11c9
i18n_label /
name age
history
message
file README.textile Sat Sep 13 15:29:38 -0700 2008 typo [iain]
file Rakefile Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
file init.rb Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
file install.rb Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
directory lib/ Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
directory spec/ Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
directory tasks/ Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
file uninstall.rb Fri Sep 12 12:43:20 -0700 2008 last commit? [iain]
README.textile

I18nLabel

Since labels don’t use I18n in Rails 2.2 (I was too late in submitting the
patch), we’d have to make due with a plugin.

Installation and configuration consists of 1 easy steps:

  1. Run:
./script/plugin install git://github.com/iain/i18n_label.git

Example

In your translation file:

en-US: activerecord: attributes: topic: name: A nice name

In your view:

<% form_for @topic do |f| %> <%= f.label :name %> <% end %>

The result is:

<label for="topic_name">A nice name (please ignore the minor problem with html in github)

For more information about where to put your translations,
visit my blog

Copyright © 2008 Iain Hecker, released under the MIT license

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