$(document).ready(function() {
  var l = location.pathname.match(/^\/([a-z][a-z]\/){1,2}/);
  if (l) {
    $("a.localize").each(function() {
      $(this).attr("href", l[0] + $(this).attr("href"));
    });
  }
});

