3

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?

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

1 Answer 1

3

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 %} 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.