【发布时间】:2012-09-28 09:13:47
【问题描述】:
我的 Rails 应用程序中有许多复杂的结构化 html + 文本,但不知道如何以可维护的方式翻译这些内容。解决这个问题的最佳方法是什么。
考虑这个haml html块:
%h3.grey
You can set your profile so that:
%h4
%ol
%li
Some line blabla
%li
Other users cannot find you
%li
Your profile appears as if it's deleted
.clear
Or
.clear
%br
- 我不想使用语言部分,它会弄乱并且在部分更改时很糟糕
- 而不是使用 1 字符串翻译来翻译上面的块
什么是翻译上述内容的简单、可维护的方式? 欢迎提出任何想法建议,希望听到其他人如何解决这个问题,谢谢!
【问题讨论】:
标签: ruby-on-rails string ruby-on-rails-3 internationalization