in a multilingual site, how can i place multilingual links to content.

i.e. in the footer i would place a Imprint but in anohter language the slug might be /de/germanImprint...is there an easy helper to always get the right url from the english slug?

  • 1
    I probably misunderstood you totally on this one, but I tried anyways.
    – carlcs
    Sep 4 '14 at 15:20
  • nah i believe thats exactly what i needed, thx! :)
    – nexflo
    Sep 8 '14 at 9:06

This is how to "translate" a slug:

{% set enSlug = 'work' %}

{# Get the ID of an entry with that english slug #}
{% set enId = craft.entries.slug(enSlug).locale('en').first().id %}

{# Use the entry ID to get the german slug #}
{% set deSlug = craft.entries.id(enId).locale('de').first().slug %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.