PHPackages                             sitegeist/translatelabels - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. sitegeist/translatelabels

ActiveTypo3-cms-extension[Localization &amp; i18n](/categories/localization)

sitegeist/translatelabels
=========================

This extension extends the TYPO3 translation handling by translation records that can be edited by backend users. In this way backend users are able to translate labels without having access to the language files.

2.3.11(7mo ago)434.2k—0%8[9 PRs](https://github.com/sitegeist/translatelabels/pulls)GPL-2.0-or-laterPHP

Since Sep 27Pushed 7mo ago3 watchersCompare

[ Source](https://github.com/sitegeist/translatelabels)[ Packagist](https://packagist.org/packages/sitegeist/translatelabels)[ RSS](/packages/sitegeist-translatelabels/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (69)Used By (0)

Extension Translatelabels for TYPO3
===================================

[](#extension-translatelabels-for-typo3)

Purpose
-------

[](#purpose)

This extension extends the TYPO3 translation handling by translation records that can be edited by backend users. In this way backend users are able to translate labels without having access to the language files.

This extension can also be used to translate forms created with the Form Editor.

In the frontend the labels appear underlined with a red line. A tooltip with its name appears on mouseover. A click on the label name opens the new translate module in the admin panel to edit the translation for the label inline.

Additionally you find a second tab in the new module in the admin panel that shows all labels found on the current page listing the corresponding language files and eventually existing overrides or translation records.

This view is especially interesting for developers.

Authors &amp; Sponsors
----------------------

[](#authors--sponsors)

- Alexander Bohndorf -

The development and the public-releases of this package is generously sponsored by my employer .

Screenshots
-----------

[](#screenshots)

### Frontend view

[](#frontend-view)

[![Frontend view](Documentation/Images/frontend-1.png)](Documentation/Images/frontend-1.png)

### Translation module in admin panel with inline editing

[](#translation-module-in-admin-panel-with-inline-editing)

[![Translation module in admin panel](Documentation/Images/admin-panel-1.png)](Documentation/Images/admin-panel-1.png)

### Translation module in admin panel with label inheritance view

[](#translation-module-in-admin-panel-with-label-inheritance-view)

[![Translation module in admin panel](Documentation/Images/admin-panel-2.png)](Documentation/Images/admin-panel-2.png)

Supported TYPO3 Versions
------------------------

[](#supported-typo3-versions)

- Version 1.x of this extension supports TYPO3 9.5.
- Version 2.0 of this extension supports TYPO3 10
- Version 2.1 of this extension supports TYPO3 11.

How to install
--------------

[](#how-to-install)

- Install the extension and activate it in Extension Manager or via composer:

    - For TYPO3 9.5: ```
        composer require sitegeist/translatelabels:^1

        ```
    - Starting from TYPO3 10.0: ```
        composer require sitegeist/translatelabels

        ```
- Then go to the backend extension manager and load the extension in "Installed Extensions".
- Update your database with BE module "Maintenance/Analyze Database Structure".
- Create a sysfolder in TYPO3 backend to store the translated labels.
- Create a localization of this sysfolder for each website language of your website.
- Include the extension template `translate_labels` into your root TYPOSCRIPT template.

How to configure
----------------

[](#how-to-configure)

Add the following TYPOSCRIPT to your template:

```
plugin.tx_translatelabels.settings.storagePid = 4711

```

Replace `4711` with the uid of the sysfolder you just created for your translated labels.

Be aware that this setting has to be defined for all pages using this extension and also for all sysfolders containing the translation records.

TYPO3 patch needed for TYPO3 version 9.5 and 10.1 (bug #87038)
--------------------------------------------------------------

[](#typo3-patch-needed-for-typo3-version-95-and-101-bug-87038)

Due to the not yet fixed bug  in TYPO3 9.5.9 and TYPO3 10.1 you have to apply a patch to your TYPO3 sources at present.

Use the latest patch set for your TYPO3 version attached to the issue.

Alternatively you can use a patch included in this extension for convenience.

[Quick guide to apply the patch](Documentation/Typo3Patch.md)

[Instructions for applying a patch to the TYPO3 sources (german)](https://techblog.sitegeist.de/typo3-version-9-core-patches-mit-composer-verwalten/)

Without this patch TYPO3 is not able to create translations of label records having the same key as their related record in the default language.

Change Log
----------

[](#change-log)

translatelabelsTYPO3Changes1.0.x9.5.xInitial release1.1.x9.5.xRemoved LLL:EXT: prefix from label keys2.0.x10.1.xCompatibility for TYPO3 10.12.1.x11.5.xCompatibility for TYPO3 11.52.3.011.5.xCompatibility for PHP 8.12.3.211.5.xAdded event dispatcher to show translate labels or not2.3.511.5.xBugfix: PHP Warning: Array to string conversion2.3.611.5.xBugfix: PHP Warning: Array to string conversionHow to activate for BE users
----------------------------

[](#how-to-activate-for-be-users)

1. [Enable admin panel for BE users.](https://docs.typo3.org/m/typo3/reference-tsconfig/9.5/en-us/UserTsconfig/AdmPanel.html)1.1 Set `admPanel.enable.all = 1` in User TSconfig or `admPanel.enable.translatelabels = 1`1.2 Set `config.admPanel = 1` in TypoScript Template
2. Login into BE and open FE afterward.
3. Click on Settings in the bottom right of admin panel.
4. Activate "Show translation labels" in settings and click on "Update settings".
5. After that you will see all labels in FE underlined with a red dashed line having a tool tip with the link to the language file and its key.
6. Furthermore, you will see a list of all used labels of the current page in Admin Panel in tab "Translate Labels".

Access rights to translate labels
---------------------------------

[](#access-rights-to-translate-labels)

Backend users who are allowed to create and edit translations need to have ...

- access rights to read and write records in the sysfolder for the translations (set them in BE module `Access`)
- BE user or group rights to list and modify records of table `Translation` (set them in BE module `Backend-User`)
- access to default language and to all languages in which they are to translate labels. (set them in BE module `Backend-User`)

Internals
---------

[](#internals)

The extension overloads the f:translate fluid view helper and renders a tag `LLL:("","")` for each label (only, if you are logged in as BE user, otherwise the labels are rendered as usual).

After all processing of frontend rendering the LLL: tags are transformed into HTML markup to display a dashed red line below each label with a tooltip showing the language file and the labels key. This also occurs only while being logged in as BE user.

Form Framework
--------------

[](#form-framework)

This extension can be used to translate forms created with form editor including validation messages, labels, placeholders, descriptions etc. Therefore this extension overrides the following two view helpers of form framework:

- formvh:translateElementProperty
- formvh:translateElementError

Form framework uses special chaining of translations for elements. For further information have a look at:

This extension implements a simplified approach to override these translations: You can only override the most specific translation of an element using the path `.element..properties.`.

Examples:

- Translation of a label of a form field
    - `registerForm.element.first-name.properties.label`
- Translation of a description of a form field
    - `registerForm.element.first-name.properties.description`
- Translation of an option with value `value1` of a radio button
    - `registerForm.element.radiobutton-1.properties.options.value1`
- Translation of an option for a multi select checkbox with value `Second`
    - `register.element.multicheckbox-1.properties.options.Second`
- Translation of the placeholder attribute
    - `registerForm.element.text-1.properties.fluidAdditionalAttributes.placeholder`

If a translation is defined for an element in the database then this will always take precedence over others defined in language files regardless of priority in the chain defined by form framework.

This behaviour is subject of change in the future.

### Validation messages in Form Framework

[](#validation-messages-in-form-framework)

If custom error messages are defined in form editor then only these messages are used for all languages and no translation chain takes place. This is default behaviour in form framework.

With this extension you can override these static values.

Example:

- `registerForm.validation.error.text-2.1428504122`

Caching
-------

[](#caching)

The extension is completely compatible with TYPO3 caching mechanisms.

Caching is disabled if translation labels are activated in admin panel. This is because otherwise the markup showing the translation labels would be cached and delivered as content also for frontend users not being also logged in as backend users.

Old pi\_base plugins
--------------------

[](#old-pi_base-plugins)

Due to API restrictions it is not possible to extend the old language handling of plugins based on AbstractPlugin (a.k.a. pi\_base plugins). Instead each inherited class has to be extended directly via xclass. This extension has an example for this for the plugin fe\_login in `Classes/Plugin/FrontendLoginController.php`.

You can overload other pi\_base plugins using the following code in your ext\_localconf.php:

```
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Felogin\\Controller\\FrontendLoginController'] = array(
    'className' => 'Sitegeist\\Translatelabels\\Plugin\\FrontendLoginController'
);
```

Example for overriding language files
-------------------------------------

[](#example-for-overriding-language-files)

ext\_localconf.php

```
// Examples for overriding language files

$overrideLanguageFiles = [
    'default' => [
        'EXT:felogin/Resources/Private/Language/locallang.xlf' => 'felogin/felogin.xlf'
    ],
    'de' => [
        'EXT:felogin/Resources/Private/Language/locallang.xlf' => 'felogin/de.felogin.xlf'
    ]
];

foreach ($overrideLanguageFiles as $language => $languageFiles) {
    foreach ($languageFiles as $originalLanguageFile => $overrideLanguageFile) {
        $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$language][$originalLanguageFile][] =
            'EXT:my_extension/Resources/Private/Language/Overrides/' . $overrideLanguageFile;
    }
}
```

Note that `my_extension` should be replaced with your extension key.

Run unit tests
--------------

[](#run-unit-tests)

```
$ cd typo3conf/ext/translatelabels
$ composer install
$ vendor/bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit/Renderer/FrontendRendererTest.php

```

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance62

Regular maintenance activity

Popularity32

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~56 days

Recently: every ~118 days

Total

40

Last Release

236d ago

Major Versions

1.1.1 → 2.0.42019-10-23

1.1.2 → 2.0.52019-10-30

1.1.3 → 2.0.62019-11-15

1.1.5 → 2.0.72021-06-15

1.1.6 → 2.0.102021-09-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/51e0a02d8e12b73949ec858638aa7e295e103022cc5a879f86ac8532c2c170bd?d=identicon)[sitegeist](/maintainers/sitegeist)

![](https://www.gravatar.com/avatar/8340d8e658ff97765f6539b8a32eaafcf12a9f27dfe608b8691d53ea589a970f?d=identicon)[bohndorf](/maintainers/bohndorf)

---

Top Contributors

[![galoppi](https://avatars.githubusercontent.com/u/909832?v=4)](https://github.com/galoppi "galoppi (47 commits)")[![s2b](https://avatars.githubusercontent.com/u/458524?v=4)](https://github.com/s2b "s2b (16 commits)")[![OleksandrMatsko](https://avatars.githubusercontent.com/u/108868156?v=4)](https://github.com/OleksandrMatsko "OleksandrMatsko (10 commits)")[![MaxAmann-sitegeist](https://avatars.githubusercontent.com/u/165805977?v=4)](https://github.com/MaxAmann-sitegeist "MaxAmann-sitegeist (6 commits)")[![ulrichmathes](https://avatars.githubusercontent.com/u/26324456?v=4)](https://github.com/ulrichmathes "ulrichmathes (6 commits)")[![t-schramm](https://avatars.githubusercontent.com/u/61553607?v=4)](https://github.com/t-schramm "t-schramm (4 commits)")[![neumann-sitegeist](https://avatars.githubusercontent.com/u/115168454?v=4)](https://github.com/neumann-sitegeist "neumann-sitegeist (3 commits)")[![Atomschinken](https://avatars.githubusercontent.com/u/3041069?v=4)](https://github.com/Atomschinken "Atomschinken (3 commits)")[![cvh-sitegeist](https://avatars.githubusercontent.com/u/157810693?v=4)](https://github.com/cvh-sitegeist "cvh-sitegeist (1 commits)")

### Embed Badge

![Health badge](/badges/sitegeist-translatelabels/health.svg)

```
[![Health](https://phpackages.com/badges/sitegeist-translatelabels/health.svg)](https://phpackages.com/packages/sitegeist-translatelabels)
```

###  Alternatives

[leuchtfeuer/locate

Locate - The users country, preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. Locate also provides geo blocking for configurable pages in configurable countries.

1182.8k](/packages/leuchtfeuer-locate)[undefined/translate-locallang

Backend Module for creating and editing of language files (locallang.xlf).

12256.9k2](/packages/undefined-translate-locallang)[evoweb/ew-llxml2xliff

Convert locallang.xml/.php files to .xlf

1045.7k1](/packages/evoweb-ew-llxml2xliff)[snowflakech/snowbabel

Translation Extension.Snowflake productions gmbh was the pioneers of this extension and handed over this to PIT Solutions Pvt Ltd in 2016 and sponsored by BIBUS AG.

101.4k](/packages/snowflakech-snowbabel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
