我使用i18n进行国际化。但是,以打击的形式出现问题。
config/locales/view/en.yml:期望它返回一个散列,但不返回
虽然,我写yml的目的是正确的(两个空格,没有点击),
出现错误。
我怎样才能解决这个问题?
en.yml
en:
moderna:
language:
en: English
jp: Japanese
kr: Korean
menu:
company: Company
home: Home
submenu:
company:
history: History
introduce: Introduce
philosophy: Philosophy
subsidiary: Subsidiary
vision: Visionerb
<%= link_to t("moderna.menu.home"), xx_path %>
<%= link_to t("moderna.submenu.company.introduce"), introduce_path %>
<%= link_to t("moderna.submenu.company.history"), history_path %>
<%= link_to t("moderna.submenu.company.philosophy"), philosophy_path %>
<%= link_to t("moderna.submenu.company.subsidiary"), subsidiary_path %>
<%= link_to t("moderna.submenu.company.vision"), vision_path %>发布于 2016-04-21 02:03:15
我找到了原因。在项目中使用i18n时
=>可能会发生error.can不加载从~所以,我更改了文件名为blow
config/locales/default/default_en.yml
config/locales/default/default_kr.yml
config/locales/model/model_en.yml
config/locales/model/model_kr.yml
engines/hoge_engines/config/locales/default/default_en.yml
engines/hoge_engines/config/locales/default/default_kr.yml
engines/hoge_engines/config/locales/modle/model_en.yml
engines/hoge_engines/config/locales/model/model_kr.yml https://stackoverflow.com/questions/36732670
复制相似问题