Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mcaine

    (@mcaine)

    Hi,

    Actually resolved it like this… but your suggestions got me there! I now have a floating “EN” that is at the top-right of the page.

    in style.css, added:

    .header_button {
    position: absolute;
    right: 0px;
    top: -160px;
    z-index: 99;
    }

    then in the header.php of the German site, we added:

    <div style="float:right;" class="header_button"><a href="<?php $Path=$_SERVER['REQUEST_URI']; echo 'https://www.xxx.ch'.$Path; ?>"><span style="color: #ff6600;">EN</span></a></div>

    The English would be the same but refer to https://www.xxx-de.ch.

    Thread Starter mcaine

    (@mcaine)

    Ah ha… that looks promising. Thank you. I’ll have a go and will let you know.

    Thank you once again.

    Thread Starter mcaine

    (@mcaine)

    Hi Carlos,

    Thanks for the tip.

    Actually, the menu across the top of each page/post, on the English site is:

    Our Story | Courses | Register | Trainers | DE

    Then the German site is:

    Unsere Geschichte | Kurse | Registieren | Dozente | EN

    So the event is a click on the menu item, not on a locale language setting.

    Is the challenge getting clearer?

    Thread Starter mcaine

    (@mcaine)

    That is correct. They are separate databases – in fact completely separate installations.

    The menu (that goes across the page) is the same on all pages/posts. Currently around 40.

    The point is this: When I add a page to the English site, I then copy it and create the same page, but in German, on the german site.

    eg We add a page called “read-all-about-it” to both sites:

    https://www.mysite.ch/read-all-about-it
    https://www.mysite-de.ch/read-all-about-it

    The menu should not have to change. When the menu “DE” or “EN” is pressed the code should simply take the URL of the current page and add “-de” or remove “-de” respectively.

Viewing 4 replies - 1 through 4 (of 4 total)