【发布时间】:2011-12-02 01:27:06
【问题描述】:
如果是一个项目:
- has_many :tasks
- accepts_nested_attributes_for :tasks
我正在使用 simple_form 像这样(简化):
simple_form_for @project do |f|
f.input :project_name
f.simple_fields_for :tasks do |j|
j.input :task_name
end
f.submit
end
如何将:task_name 的标签国际化?我在simple_form.it.yml 文件中尝试了很多组合,例如:
it:
simple_form:
labels:
project:
project_name: 'Nome progetto'
task:
task_name: 'Nome compito'
无法在文档中找到示例。 Google 指出了几个明显相关的已解决问题:
https://github.com/plataformatec/simple_form/issues/48
https://github.com/plataformatec/simple_form/issues/194
但到目前为止我很茫然......
谢谢! 朱塞佩
【问题讨论】:
标签: ruby-on-rails-3 internationalization nested-attributes simple-form