问题标签 [traco]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
99 浏览

ruby-on-rails - Using traco but the column is not translating in the database

My rails app was using translatable_column to load the config/locales/he-IL.yml content to its own column in a table's column.

the rails app is built with 3.0.19 and ruby 1.8.7, I installed traco gem "traco", "~> 1.0.0" I am not sure which traco version is compatible with 1.8.7. but I know its good with activerecord>3.

There are a lot of statements in the he-IL.yml file in config/locales

in my statement.rb model I have

0 投票
1 回答
61 浏览

ruby-on-rails - 我们如何在 rails 模型属性的渲染视图中获得翻译,例如博客文章?

我想在转换为当前用户区域设置 IE 的视图中显示时翻译 rails 中的列我不需要将翻译真正存储在数据库中。宝石有什么理由喜欢GlobalizeTraco强迫您在保存时将翻译存储在单独的表中?

当我呈现我的博客文章时,是否有一种方法可以在视图中翻译我想要的内容?

我之前在 Rails 中没有进行任何语言转换,但似乎 YAML 文件仅用于静态文本 IE,我们无法在模型对象中添加并翻译它们?