---
title: "bgm_hreflang Einrichtung"
url: "https://www.typo3.net/d/121013-bgm-hreflang-einrichtung"
source: "typo3.net"
tags: ["Extensions","Frage","SEO"]
created: "2015-10-01"
last_reply: "2015-10-01"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# bgm_hreflang Einrichtung

Extensions · 0 Antworten · gestartet 2015-10-01

## Eröffnungsbeitrag

**Steppo** · 2015-10-01 · [Beitrag #1](https://www.typo3.net/d/121013-bgm-hreflang-einrichtung/1)

Hallo liebe Community,

bei einem Projekt habe ich zum ersten mal die Extension bgm_hreflang genutzt.
Installiere usw. stellte kein Problem da.

Im Backend sehe ich alle benötigten Felder und kann einen Bezug zwischen den Seiten herstellen.
Allerdings bekomme ich bei hreflang="-" keine Sprache angezeigt.

Das Projekt hat ein Multitree Konzept, de (id11) und en (id21).

Das bekomme ich im Quelltext angezeigt:

<link rel="alternate" hreflang="-" href="<http://domin.com/de/page-de.html>" />
<link rel="alternate" hreflang="-" href="<http://domain.com/en/page-en.html>" />

In der AdditionalConfiguration.php steht folgendes:

$languageMapping = array(

//"sys_language_uid" and "isolanguagecode" have to be unique in the array $languageMapping!
        sys_language_uid => isolanguagecode,

//Example
        0 => 'de', //german
        1 => 'en', //english
);

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['bgm_hreflang']['countryMapping'] = array(

//"pageid" is the rootpage of a country branch. It has to be unique in the array $countryMapping!
        pageid => array(

//"isocountrycode" has to be unique in the array $countryMapping!
                'countryCode' => isocountrycode,

//'$languageMapping + array(0 => isolanguagecode)' can be assigned more than once with the same "isolanguagecode" in the array countryMapping.
                'languageMapping' => $languageMapping + array(0 => isolanguagecode),

//This is optional. You need this, if you want the Germany country branch to be used as Austrian country branch, too.
                //'additionalCountries' => array(isocountrycode, isocountrycode, ...),
        ),

//Example
        11 => array( //Germany
                'countryCode' => 'de',
                'languageMapping' => $languageMapping + array(0 => 'de'),
        ),
        21 => array( //International
                'countryCode' => 'en',
                'languageMapping' => $languageMapping + array(0 => 'en'),
        ),
);

//If $_GET['L']==0, pages in this tree are rendered with hreflang="x-default", else only the isolanguagecode is used (without the isocountrycode)
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['bgm_hreflang']['defaultCountryId'] = 0;

page.headerData.30 = USER
page.headerData.30 {
    userFunc = BGM\BgmHreflang\Utility\HreflangTags->renderFrontendList
}

Vielleicht kann mir ja jemand weiterhelfen.

lg
Steppo

---

Quelle: „bgm_hreflang Einrichtung“, typo3.net, https://www.typo3.net/d/121013-bgm-hreflang-einrichtung
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
