I’m trying to user MiddlemanApp to localize a website, following this http://middlemanapp.com/guides/localization guide.
I have a locales/ folder under the project’s root, with en.yml and it.yml inside. The files looks like this:
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"
The localization files seem to be loaded, when i start the server i get:
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
when i navigate the the site root http://localhost:4567/ the page loads and the localization strings are taken from the it.yml localizazion. Shouldn’t it go to the en.yml? According to the documentation it should take the locales in alphabetic order if not differently specified.
When i navigate to http://localhost:4567/en/index.html or http://localhost:4567/it/index.html, instead, i get a:
File Not Found
/it/index.html
I tried to restart the server, change the parameters of the localize function in config.rb (path and mount_to_root), but got nothing different. Anyone have ideas?
This will depend on the contents of your /source/localizable folder. Only templates in this folder will have access to i18n values.
If you’re still having issues, please submit a bug report.