class ActionView::Helpers::FormBuilder

def label(method, text = nil, options = {}, &block)

# =>
end
raw('Accept Terms.')
label(:terms) do

# =>
end
])
("error_label" if builder.object.errors.include?(:cost))
"cost_label",
content_tag(:span, builder.translation, class: [
label(:cost) do |builder|

# =>
end
content_tag(:span, builder.translation, class: "cost_label")
label(:cost) do |builder|

# =>
end
content_tag(:span, translation, class: "cost_label")
label(:cost) do |translation|

# =>
label(:privacy, "Public Post", value: "public")

# =>
label(:title, "A short title", class: "title_label")

# =>
label(:title, "A short title")

# =>
label(:cost)



cost: "Total cost"
post:
attributes:
activerecord:

(if you are using ActiveRecord):
Localization can also be based purely on the translation of the attribute-name

# =>
label(:body)

Which then will result in

body: "Write your entire text here"
post:
label:
helpers:

For example you can define the following in your locale (e.g. en.yml)
You can localize your labels based on model and attribute names.

# =>
label(:title)
==== Examples

target labels for radio_button tags (where the value is used in the ID of the input tag).
onto the HTML as an HTML element attribute as in the example shown, except for the :value option, which is designed to
Additional options on the label tag can be passed as a hash with +options+. These options will be tagged
is found in the current I18n locale (through helpers.label..) or you specify it explicitly.
assigned to the template (identified by +object+). The text of label will default to the attribute name unless a translation
Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object
def label(method, text = nil, options = {}, &block)
  @template.label(@object_name, method, text, objectify_options(options), &block)
end