Created
March 3, 2011 00:34
-
-
Save ballpointcarrot/852093 to your computer and use it in GitHub Desktop.
Examle Rails locale YAML to customize Form Label names
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ form_for(@race) do |f| | |
~ if @race.errors.any? | |
#error_explanation | |
%h2 #{pluralize(@race.errors.count, "error")} prohibited this race from being saved: | |
%ul | |
~@race.errors.full_messages.each do |msg| | |
%li= msg | |
.field | |
=f.label :name | |
%br | |
=f.text_field :name | |
.field | |
=f.label :date | |
%br | |
=f.datetime_select :date | |
.field | |
=f.label :details | |
%br | |
=f.text_area :details, :rows => 3 | |
.actions | |
=f.submit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
hello: "Hello world" | |
helpers: | |
label: | |
race: | |
name: "Race Name" | |
date: "Race Date" | |
details: "Race Details" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment