我想使用I18n,我已經遵循如何做到這一點從railscast
但事情瘋了,我不知道錯在哪裏,試圖檢查格式,嘗試了幾種方法,但仍然可以不行。錯誤I18n :: InvalidLocaleData
我en.yml
en:
category:
index:
title: "Listing Categories"
name: "Name"
is_active: "Is Active"
我view
<%= t 'category.index.title' %>
但返回I18n::InvalidLocaleData in Categories#index
和can not load translations from /home/lenovo/cost_control/config/locales/en.yml, expected it to return a hash, but does not
我曾嘗試對我的en.yml
剛:
en:
title: "Listing Categories"
,可以完美地工作,但是當我增加更多的線路,只返回我的錯誤。對不起,我只是沒有那麼高級,但感謝你們的幫助:真的。
完成檢查[此問題](http://stackoverflow.com/questions/12286099/rails-console-fails-to-start-with-error-from-i18n) – ksugiarto 2013-03-11 05:40:16
而且[this](http:///stackoverflow.com/questions/13123406/gem-spree-i18n-throws-error-on-server-startup-can-not-load-translations) – ksugiarto 2013-03-11 05:40:40