Custom Links - Multilingual

Hi,

maybe someone can help me here:
I have added a link to the 'Impressum' to the footer of my site:
http://ralf-kerkhoff.de
which looks like:
'href="http://ralf-kerkhoff.de/seiten/impressum"><?php echo gettext('Legal Notice'); ?>'

Gettext works fine. In german 'Impressum' is displayed - if you choose english as the language 'Legal Notice' is displayed.

My problem is:
the link itself points to the german page 'Impressum'. How must I modify the link that if site language is set to english the link points to the english version of the page?

I did not find a hint in the documentation.

Ralf

Comments

  • acrylian Administrator, Developer
    This is by the way no custom link actually as it is a Zenpage page. A custom link would be an outside link somewhere else technically.

    If you added the link statically you would have to check the locale manually. Try the actual template functions for Zenpage pages: `get/printPageURL()`.
  • Ralf Member
    Hi Acrylian,

    after 2 coffees it was pretty simple.
    Note to myself:
    Dink a few coffees before start thinking:-)
    The problöem was the domain name in front of the link.
    Replacing:
    http://ralf-kerkhoff.de/seiten/impressum
    with
    /seiten/impressum

    works without problems.
  • acrylian Administrator, Developer
    Yeah, coffee helps :-)
Sign In or Register to comment.