translated_attribute_value:用于翻译属性值的 Gem

时间:2021-07-06 21:46:09
【文件属性】:
文件名称:translated_attribute_value:用于翻译属性值的 Gem
文件大小:10KB
文件格式:ZIP
更新时间:2021-07-06 21:46:09
Ruby 如何使用 如果您使用 ActiveRecord 或 Mongoid,默认情况下将包含翻译的属性值,否则您必须在模型类中包含 TranslatedAttributeValue::Base: class User include TranslatedAttributeValue :: Base # model related code end 然后您可以将属性翻译如下: 活动记录 pt-BR : activerecord : attributes : user : status_translation : value1 : ' Translation for value1 ' value2 : ' Translation for value2 ' 蒙古人 pt-BR : mongoid :
【文件预览】:
translated_attribute_value-master
----.gitignore(176B)
----translated_attribute_value.gemspec(862B)
----.rspec(8B)
----.ruby-gemset(24B)
----db()
--------schema.rb(165B)
----.ruby-version(6B)
----LICENSE.txt(1KB)
----spec()
--------spec_helper.rb(450B)
--------translated_attribute_value()
----README.md(1KB)
----vendor()
--------assets()
----lib()
--------translated_attribute_value.rb(346B)
--------translated_attribute_value()
----Gemfile(165B)
----Rakefile(599B)
----Gemfile.lock(3KB)

网友评论