time_ago_in_words和本地化 [英] time_ago_in_words and localize

查看:55
本文介绍了time_ago_in_words和本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 time_ago_in_words i18n.locale 一起使用?

Is it possible to use time_ago_in_words with i18n.locale?

如何?

谢谢

推荐答案

如果正在使用Rails> 2.2,该帮助程序已经对区域设置有所了解。

If you are using Rails > 2.2, the helper is already locale-aware.

只需从语言环境存储库,并将其存储在您的 / config / locales 路径中。然后设置您的区域设置首选项。

Just download the right localization file from the locale repository and store it into your /config/locales path. Then set your locale preferences.

这篇关于time_ago_in_words和本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆