WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • Mod WBLingual
  • Print
Pages: [1]   Go Down

Author Topic: Mod WBLingual  (Read 13757 times)

Offline CodeALot

  • Posts: 579
  • Gender: Male
Mod WBLingual
« on: April 18, 2024, 12:41:45 AM »
Two questions:

  • Why is there a readme that tells us to use 'droplet [[iMultiLingual]]' if there is no such droplet?
  • Is there support for hreflang-tags, and if so: how? :-)
Logged

Offline sternchen8875

  • Global Moderator
  • *****
  • Posts: 601
Re: Mod WBLingual
« Reply #1 on: April 18, 2024, 08:57:02 AM »
Der Hinweis auf das Droplet stammt noch aus früheren Zeiten und ist mittlerweile nicht mehr notwendig, das das frühere Addon zur Sprachumschaltung nun fester Bestandteil von WB ist.
Beispiele zur Anwendung des hreflang-Tags findest du in der index.php des DefaultTemplates

Quote
<?php
        if (is_callable('LangPageId') && $iMultiLang) {
?>
                <link rel="alternate" hreflang="x-default" href="[wblink<?= LangPageId($sPageLang); ?>]">
                <link rel="alternate" hreflang="de" href="[wblink<?= LangPageId('DE'); ?>]">
                <link rel="alternate" hreflang="en" href="[wblink<?= LangPageId('EN'); ?>]">
                <link rel="alternate" hreflang="fr" href="[wblink<?= LangPageId('FR'); ?>]" />
                <link rel="alternate" hreflang="nl" href="[wblink<?= LangPageId('NL'); ?>]" />
<?php
        }

Beachte, das dies nur funktioniert, wenn du auch die Definitionen von $iMultiLang und LangPageId übernimmst, die sich weiter oben in gleicher Datei befinden

Google Translation

The reference to the Droplet dates back to earlier times and is no longer necessary as the previous addon for language switching is now an integral part of WB.
You can find examples of how to use the hreflang tag in the index.php of the DefaultTemplate

Quote
<?php
        if (is_callable('LangPageId') && $iMultiLang) {
?>
                <link rel="alternate" hreflang="x-default" href="[wblink<?= LangPageId($sPageLang); ?>]">
                <link rel="alternate" hreflang="de" href="[wblink<?= LangPageId('DE'); ?>]">
                <link rel="alternate" hreflang="en" href="[wblink<?= LangPageId('EN'); ?>]">
                <link rel="alternate" hreflang="fr" href="[wblink<?= LangPageId('FR'); ?>]" />
                <link rel="alternate" hreflang="nl" href="[wblink<?= LangPageId('NL'); ?>]" />
<?php
        }

Note that this only works if you also copy the definitions of $iMultiLang and LangPageId, which are in the same file above
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.13.x) »
  • Modules »
  • Mod WBLingual
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2