简体   繁体   English

Rails i18n,管理本地化的最佳方法

[英]rails i18n, the best way to manage localization

I'm using http://guides.rubyonrails.org/i18n.html for localization. 我正在使用http://guides.rubyonrails.org/i18n.html进行本地化。 Looks like that the only solution for updating localization is to update yml files. 看来,更新本地化的唯一解决方案是更新yml文件。 May be there are some solutions or gems which adds ability to update localization via application. 可能有一些解决方案或gems通过应用程序增加了更新本地化的能力。 For example we can include some gem and update localization files from our app. 例如,我们可以包含一些gem并通过我们的应用程序更新本地化文件。 Is there some solutions for that? 有解决方案吗?

Take a look at Globalize 3 . 看一下Globalize 3 It stores the translation/localization data in the database. 它将翻译/本地化数据存储在数据库中。 There's also a gem to hook it up with ActiveAdmin . 还有一个宝石可以与ActiveAdmin挂钩

Also, while you're at it, don't miss the rails-i18n gem mentioned in the guide. 另外,当您使用它时,请不要错过指南中提到的rails-i18n gem。 It translates Rails itself into many languages, so you don't have to do it yourself. 它可以将Rails本身翻译成多种语言,因此您不必自己做。

这里是我自己产品的无耻插件,但是请访问http://www.localeapp.com ,以获取开箱即用的YAML文件解决方案。

通过Redis管理i18n 很有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM