Zum Inhalt springen

Adapt texts in extensions in an update-proof manner

All texts in extensions are saved in a special file (locallang.xlf). This file is part of an extension and is overwritten when the extension is updated. If changes have been made in this file, they will be lost. This can be avoided by making the changes in the TypoScript. In some extensions, translations are not provided for all languages. The missing translations can also be added here.

In locallang.xlf you can see how the individual elements are labeled and can be addressed via TypoScript.

Where the locallang.xlf can be found depends on whether an extension is based on piBase or Extbase.

For older piBase extensions, for example: typo3conf/ext/extkey/pi/locallang.xlf or for system extensions typo3/sysext/extkey/pi/locallang.xlf

For Extbase extensions usually: typo3conf/ext/extkey/Resources/Private/Language/locallang.xlf or for system extensions typo3/sysext/extkey/Resources/Private/Language/locallang.xlf

Here is an example of the extension tx_indexedsearch:

Procedure up to TYPO3 6.2 LTS

Up to TYPO3 6.2, the locallang.xlf file is located in the pi/ directory of the extension. (typo3/sysext/indexed_search/pi/)

## Default Text = English
plugin.tx_indexedsearch._LOCAL_LANG.default {
  form_searchFor = Search for:
  submit_button_label = Search
  noResults = No results!
}

## German text
plugin.tx_indexedsearch._LOCAL_LANG.de {
  form_searchFor = Search for:
  submit_button_label = Search
  noResults = No search results!
}

Procedure as of TYPO3 7.6 LTS

Since TYPO3 7.6, indexed_search is also based on Extbase. The directory and file structure has changed accordingly.

The file locallang.xlf is now located in the directory typo3/sysext/indexed_search/Resources/Private/Language/

The names (labels) of the elements have also changed.

## Default Text = English
plugin.tx_indexedsearch._LOCAL_LANG.default {
  form.searchFor = Search for:
  form.submit = Search
  result.noResult = No results!
}

## German text
plugin.tx_indexedsearch._LOCAL_LANG.de {
  form.searchFor = Search for:
  form.submit = Search
  result.noResult = No search results!
}
Updated: 09.04.2025