Download the PHP package sitegeist/translatelabels without Composer

On this page you can find all versions of the php package sitegeist/translatelabels. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package translatelabels

Extension Translatelabels for TYPO3

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 & Sponsors

The development and the public-releases of this package is generously sponsored by my employer https://www.sitegeist.de.

Screenshots

Frontend view

Translation module in admin panel with inline editing

Translation module in admin panel with label inheritance view

Supported TYPO3 Versions

How to install

How to configure

Add the following TYPOSCRIPT to your template:

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)

Due to the not yet fixed bug https://forge.typo3.org/issues/87038 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

Instructions for applying a patch to the TYPO3 sources (german)

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

translatelabels TYPO3 Changes
1.0.x 9.5.x Initial release
1.1.x 9.5.x Removed LLL:EXT: prefix from label keys
2.0.x 10.1.x Compatibility for TYPO3 10.1
2.1.x 11.5.x Compatibility for TYPO3 11.5
2.3.0 11.5.x Compatibility for PHP 8.1
2.3.2 11.5.x Added event dispatcher to show translate labels or not
2.3.5 11.5.x Bugfix: PHP Warning: Array to string conversion
2.3.6 11.5.x Bugfix: PHP Warning: Array to string conversion

How to activate for BE users

  1. Enable admin panel for BE users. 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

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

Internals

The extension overloads the f:translate fluid view helper and renders a tag 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

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:

Form framework uses special chaining of translations for elements. For further information have a look at: https://docs.typo3.org/c/typo3/cms-form/9.5/en-us/Concepts/FrontendRendering/Index.html#translation

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

Examples:

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

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:

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

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 .

You can overload other pi_base plugins using the following code in your ext_localconf.php:

Example for overriding language files

ext_localconf.php

Note that my_extension should be replaced with your extension key.

Run unit tests


All versions of translatelabels with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^11.5 || ^10.4
typo3/cms-adminpanel Version ^11.5 || ^10.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sitegeist/translatelabels contains the following files

Loading the files please wait ....