[英]Translate activerecord attributes
I saw a lot of topics on Stack but still can't find solution. 我在Stack上看到了很多主题,但仍然找不到解决方案。 I had to translate my model attribute so I followed:
我必须翻译我的模型属性,所以我遵循:
Translations for Active Record Models 活动记录模型的翻译
I want get something like this: "Pozycja nie może być puste" <= "%{attribute} %{message} 我想要得到这样的东西:“ Pozycja niemożebyćpuste” <=“%{attribute}%{message}
attribute => position 属性=>位置
message => nie może być puste" message => niemożebyćpuste”
So I built this but it isn't working. 所以我建立了这个,但是没有用。 How setup this interpolation?
如何设置该插值?
errors:
format: "%{attribute} %{message}"
messages:
blank: "nie może być puste"
activerecord:
models:
user:
attributes:
position: "Pozycja"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.