Skip to content

Instantly share code, notes, and snippets.

@tvaughan
Created October 14, 2012 17:43
Show Gist options
  • Save tvaughan/3889303 to your computer and use it in GitHub Desktop.
Save tvaughan/3889303 to your computer and use it in GitHub Desktop.

M'kay. I've solved most of my problems. Yay me. I'm down to just one. Let's say I have:

locales/en.yml

about: "About"
paths:
  about: "about"

locales/es.yml

about: "Sobre"
paths:
  about: "sobre"

source/localizable/index.html.erb

<%= link_to _("about"), "about.html" %>

Plus I have source/localizable/about.html.erb.

I end up with:

source/en/index.html
source/en/about.html
source/es/index.html
source/es/sobre.html

All correct. But, in source/es/index.html I end up with a link that looks like:

<a href="about.html">Sobre</a>

How do I make it so that this becomes:

<a href="sobre.html">Sobre</a>

?

I've looked at the site-wide "data" structure and the sitemap. But I don't understand these enough to know if that's where my answer lies or not. I tried to reference "pages.about" and I couldn't get that to work either.

Any help is greatly appreciated. Thanks.

-Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment