time_ago_in_words 和本地化 [英] time_ago_in_words and localize

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

问题描述

是否可以将 time_ago_in_wordsi18n.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天全站免登陆