WebsiteBaker Community Forum

WebsiteBaker Support (2.13.x) => Modules => Topic started by: CodeALot on April 18, 2024, 12:41:45 AM

Title: Mod WBLingual
Post by: CodeALot on April 18, 2024, 12:41:45 AM
Two questions:

Title: Re: Mod WBLingual
Post by: sternchen8875 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