// Read the XML file for a given extension and language $labels = t3lib_div::readLLXMLfile( PATH_site . 'typo3conf/ext/my_extension/Resources/Private/Language/locallang.xml', $GLOBALS['LANG']->lang, true ); // Get a specific label $label = $labels['my_label'];
// Read a shared XML file for a given language $labels = t3lib_div::readLLXMLfile( PATH_site . 'typo3conf/l10n/en/my_extension.xml', 'en' ); // Get a specific label $label = $labels['my_label'];This example reads a shared XML file for the "my_extension" extension and the "en" language. It then retrieves the label identified by the "my_label" key. Both examples demonstrate how to use t3lib_div readLLXMLfile to parse XML files containing localized labels. The function returns an associative array with the labels as keys and the translations as values. The package library for this function is TYPO3 CMS Core.