The examples on Middleman's web page are in ERB, but I like to use HAML.
http://middlemanapp.com/advanced/localization/
This is their example localization YAML file:
---
es:
hello: "Hola"
And this is how they use ERB to access it.
<%= I18n.t(:hello) %> World
But I prefer HAML to ERB. How does the above line translate into HAML?
This would simply be :
= I18n.t(:hello)
World
You might want to put the greeting in your localization file though :
es:
hello: "Hola %{name}"
and call it from your HAML like this
= I18n.t(:hello, :name => 'World')