我正在使用Rails i18n來本地化我的網站。Rails i18N翻譯yml文件中的驚歎號是什麼意思?
在翻譯YML文件,我看到
time:
am: am
formats:
default: ! '%a, %d %b %Y %H:%M:%S %z'
long: ! '%d %B, %Y %H:%M'
short: ! '%d %b %H:%M'
pm: pm
(從https://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en-GB.yml拍攝)
是什麼感嘆號是什麼意思?如果你拿走感嘆號,它有什麼不同?
感謝
你是否刪除它們以查看是否可以發現任何區別?冒險精神發生了什麼? – TheZ 2012-07-06 15:36:10
請參閱http://stackoverflow.com/questions/9664113/what-does-a-single-exclamation-mark-do-in-yaml – Stefan 2012-07-06 15:43:44
我讀過@Stefan發佈的鏈接,但我仍然沒有了解這如何適用於Rails。 – 2013-05-31 09:07:14