このhttp://middlemanapp.com/guides/localizationガイドに従って、MiddlemanAppを使用してWebサイトをローカライズしようとしています。
プロジェクトのルートの下に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.ymllocalizazionから取得されます。en.ymlに行くべきではありませんか?ドキュメントによると、別の方法で指定されていない場合は、ロケールをアルファベット順に取得する必要があります。
http:// localhost:4567 / en / index.htmlまたはhttp:// localhost:4567 / it / index.htmlに移動すると、代わりに次のようになります。
File Not Found
/it/index.html
サーバーを再起動し、config.rbのlocalize関数のパラメーター(pathおよびmount_to_root)を変更しようとしましたが、何も変わりませんでした。誰かアイデアがありますか?