PHP code example of labor-digital / typo3-translation-utils
1. Go to this page and download the library: Download labor-digital/typo3-translation-utils library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
labor-digital / typo3-translation-utils example snippets
namespace LaborDigital\T3baExample\Configuration\ExtConfig;
use LaborDigital\T3ba\ExtConfig\ExtConfigContext;
use LaborDigital\T3tu\ExtConfigHandler\ConfigureTranslationUtilsInterface;
use LaborDigital\T3tu\ExtConfigHandler\TransUtilsConfigurator;
class TranslationUtils implements ConfigureTranslationUtilsInterface
{
public static function configureTranslationUtils(TransUtilsConfigurator $configurator, ExtConfigContext $extConfigContext): void
{
// The default export format can be configured for the extension
$configurator->setDefaultExportFormat('xls');
// You can also add constraints that define which languages and/or files should be
namespace LaborDigital\T3baExample\Configuration\ExtConfig;
use LaborDigital\T3ba\ExtConfig\ExtConfigContext;
use LaborDigital\T3tu\ExtConfigHandler\ConfigureTranslationUtilsInterface;
use LaborDigital\T3tu\ExtConfigHandler\TransUtilsConfigurator;
class TranslationUtils implements ConfigureTranslationUtilsInterface
{
public static function configureTranslationUtils(TransUtilsConfigurator $configurator, ExtConfigContext $extConfigContext): void
{
$extConfigContext->runWithExtKeyAndVendor('news', null, function () use ($configurator) {
// Everything in this closure is executed as if the configuration was added by ext:news
$configurator->setDefaultExportFormat('xls');
});
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.