Project

General

Profile

Actions

Feature #50467

closed

Support custom translation servers for extensions

Added by Xavier Perseguers over 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Category:
Localization
Target version:
Start date:
2013-07-26
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.4
Tags:
Complexity:
easy
Sprint Focus:

Description

With the use of XLIFF and the freely available Pootle [1] translation server, companies and individuals may easily set up a custom translation server for their extensions.

TYPO3 should be able to fetch localization packages from those custom translation servers.

The proposed implementation will provide a signal that may be implemented like this to override the mirror URL to be used to fetch localization packages for a given extension:

EXT:myext/localconf.php:

/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher');

$signalSlotDispatcher->connect(
    version_compare(TYPO3_version, '7.0', '<')
        ? 'TYPO3\\CMS\\Lang\\Service\\UpdateTranslationService'
        : 'TYPO3\\CMS\\Lang\\Service\\TranslationService',
    'postProcessMirrorUrl',
    'Company\\Extension\Slots\\CustomMirror',
    'postProcessMirrorUrl'
);

EXT:myext/Classes/Slots/CustomMirror.php:

<?php
namespace Company\Extensions\Slots;
class CustomMirror {

    /** @var string */
    protected static $extKey = 'myext';

    public function postProcessMirrorUrl($extensionKey, &$mirrorUrl) {
        if ($extensionKey === self::$extKey) {
            $mirrorUrl = 'http://mycompany.tld/typo3-packages/';
        }
    }

}


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #66928: Cannot use custom mirror URL anymore for XLIFFClosed2015-05-13

Actions
Related to TYPO3 Core - Bug #93889: Cannot modify language pack remote base URLClosedChristian Kuhn2021-04-09

Actions
Actions

Also available in: Atom PDF