我正在尝试用户MiddlemanApp本地化一个网站,遵循此http://middlemanapp.com/guides/localization指南。中间人本地化给出404
我在项目的根目录下有一个locales /文件夹,里面有en.yml和it.yml。这些文件看起来是这样的:
en.yml
---
en:
rooms: "rooms"
restaurant: "restaurant"
bar: "bar"
contacts: "contacts"
gallery: "gallery"
about: "about the website"
press: "press"
it.yml
---
it:
rooms: "stanze"
restaurant: "ristorante"
bar: "bar"
contacts: "contatti"
gallery: "galleria"
about: "il sito web"
press: "stampa"
文件似乎本地化被加载,当我开始我得到的服务器:
Using inline Guardfile.
Guard is now watching at '...'
LiveReload 1.6 is waiting for a browser to connect.
== Locales: en, it
== The Middleman is standing watch on port 4567
当我浏览网站根http://localhost:4567/页面加载和本地化字符串从it.yml localizazion采取。它不应该去en.yml吗?根据文档,如果没有不同的规定,它应该按照字母顺序采用语言环境。
,当我浏览到http://localhost:4567/en/index.html或http://localhost:4567/it/index.html,相反,我得到一个:
File Not Found
/it/index.html
我试图重新启动服务器,改变本地化功能的config.rb参数(路径和mount_to_root),但没有什么不同。任何人有想法?
我找到了解决方案,但忘了更新。无论如何,从文档中不是很清楚,但所有必须使用i18n值的模板必须放在/ source/localizable文件夹中。然而,部分内容仍然出现在/源中,这使得所有的内容都令人困惑。 – 2012-02-14 08:58:02
如果文档或可用性需要一些工作,请提交错误报告,我们将解决这些问题。 – 2012-02-15 21:34:24