Hello!
[Contao 4.8.5] [Eigenes Modul mit ->setLoadAfter([ContaoCoreBundle::class,ContaoFaqBundle::class,Con taoNewsBundle::class,ContaoNewsletterBundle::class ,ContaoCalendarBundle::class, ContaoCommentsBundle::class]
In einer foreach gebe ich alle Typen der Contentelemente aus ($content->type == headline, text, gallery, article, table, toplink, accordionSingle, accordionStart, module....).
Damit nicht nur der Key dort steht, lade ich die Language-Files mit \System::loadLanguageFile('tl_content');
Mit folgendem Code werden jetzt aber nicht ALLE Contentelemente übersetzt:
PHP-Code:
<?php echo $GLOBALS['TL_LANG']['tl_content'][$content->type][0]; ?>
Ergebnis für für die oben genannten Typen:
- headline == Überschrift
- text == Text
- gallery == NULL
- article == Artikel
- table == NULL
- toplink == NULL
- accordionSingle ==NULL
- accordionStart == NULL
- module => Modul
Warum gibt es für einige Elemente keine Übersetzung?
Komisch ist auch folgende Ausgabe:
PHP-Code:
var_dump ($GLOBALS['TL_LANG']['tl_content']['table'] );
array(1) { [1]=> string(49) "Tabelleneinträge aus einer CSV-Datei importieren"
# Wo ist Key 0 -> und natürlich ist hier auch klar warum keine Übersetzung erfolgt?
Verwendet: Contao 4.8.5 und die Contao-Demo-Installation.
Hat jemand eine Idee?
lg heyho!
Lesezeichen