WebsiteBaker Community Forum
WebsiteBaker Support (2.13.x) => Modules => Topic started by: CodeALot 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? :-)
-
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
<?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
<?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