TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Lang\Service\TranslationService Class Reference
Inheritance diagram for TYPO3\CMS\Lang\Service\TranslationService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 injectTerService (\TYPO3\CMS\Lang\Service\TerService $terService)
 
 injectSignalSlotDispatcher (\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher)
 
 injectRepositoryHelper (\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper $helper)
 
 updateTranslation ($extensionKey, $locales)
 

Public Attributes

const TRANSLATION_NOT_AVAILABLE = 0
 
const TRANSLATION_AVAILABLE = 1
 
const TRANSLATION_FAILED = 2
 
const TRANSLATION_OK = 3
 
const TRANSLATION_INVALID = 4
 
const TRANSLATION_UPDATED = 5
 

Protected Member Functions

 updateTranslationForExtension ($extensionKey, $locale)
 
 getMirrorUrl ($extensionKey)
 

Protected Attributes

 $terService
 
 $signalSlotDispatcher
 
 $mirrorUrl = ''
 

Detailed Description

Translation service

Definition at line 20 of file TranslationService.php.

Member Function Documentation

◆ getMirrorUrl()

TYPO3\CMS\Lang\Service\TranslationService::getMirrorUrl (   $extensionKey)
protected

Returns the mirror URL for a given extension.

Parameters
string$extensionKey
Returns
string

Definition at line 137 of file TranslationService.php.

References TYPO3\CMS\Lang\Service\TranslationService\$mirrorUrl.

Referenced by TYPO3\CMS\Lang\Service\TranslationService\updateTranslationForExtension().

◆ injectRepositoryHelper()

TYPO3\CMS\Lang\Service\TranslationService::injectRepositoryHelper ( \TYPO3\CMS\Extensionmanager\Utility\Repository\Helper  $helper)
Parameters
\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper$helperThe helper

Definition at line 66 of file TranslationService.php.

◆ injectSignalSlotDispatcher()

TYPO3\CMS\Lang\Service\TranslationService::injectSignalSlotDispatcher ( \TYPO3\CMS\Extbase\SignalSlot\Dispatcher  $signalSlotDispatcher)
Parameters
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher$signalSlotDispatcher

Definition at line 58 of file TranslationService.php.

References TYPO3\CMS\Lang\Service\TranslationService\$signalSlotDispatcher.

◆ injectTerService()

TYPO3\CMS\Lang\Service\TranslationService::injectTerService ( \TYPO3\CMS\Lang\Service\TerService  $terService)
Parameters
\TYPO3\CMS\Lang\Service\TerService$terService

Definition at line 50 of file TranslationService.php.

References TYPO3\CMS\Lang\Service\TranslationService\$terService.

◆ updateTranslation()

TYPO3\CMS\Lang\Service\TranslationService::updateTranslation (   $extensionKey,
  $locales 
)

Update translation for given extension

Parameters
string$extensionKeyThe extension key
mixed$localesComma separated list or array of locales
Returns
array Update information

Definition at line 82 of file TranslationService.php.

References $locales, TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode(), and TYPO3\CMS\Lang\Service\TranslationService\updateTranslationForExtension().

◆ updateTranslationForExtension()

TYPO3\CMS\Lang\Service\TranslationService::updateTranslationForExtension (   $extensionKey,
  $locale 
)
protected

Update the translation for an extension

Parameters
string$extensionKeyThe extension key
string$localeLocale to update
Returns
int Translation state
Exceptions

Definition at line 111 of file TranslationService.php.

References TYPO3\CMS\Lang\Service\TranslationService\$mirrorUrl, and TYPO3\CMS\Lang\Service\TranslationService\getMirrorUrl().

Referenced by TYPO3\CMS\Lang\Service\TranslationService\updateTranslation().

Member Data Documentation

◆ $mirrorUrl

TYPO3\CMS\Lang\Service\TranslationService::$mirrorUrl = ''
protected

◆ $signalSlotDispatcher

TYPO3\CMS\Lang\Service\TranslationService::$signalSlotDispatcher
protected

◆ $terService

TYPO3\CMS\Lang\Service\TranslationService::$terService
protected

◆ TRANSLATION_AVAILABLE

const TYPO3\CMS\Lang\Service\TranslationService::TRANSLATION_AVAILABLE = 1

Definition at line 26 of file TranslationService.php.

◆ TRANSLATION_FAILED

const TYPO3\CMS\Lang\Service\TranslationService::TRANSLATION_FAILED = 2

Definition at line 27 of file TranslationService.php.

◆ TRANSLATION_INVALID

const TYPO3\CMS\Lang\Service\TranslationService::TRANSLATION_INVALID = 4

Definition at line 29 of file TranslationService.php.

◆ TRANSLATION_NOT_AVAILABLE

const TYPO3\CMS\Lang\Service\TranslationService::TRANSLATION_NOT_AVAILABLE = 0

Status codes for AJAX response

Definition at line 25 of file TranslationService.php.

◆ TRANSLATION_OK

const TYPO3\CMS\Lang\Service\TranslationService::TRANSLATION_OK = 3

Definition at line 28 of file TranslationService.php.

◆ TRANSLATION_UPDATED

const TYPO3\CMS\Lang\Service\TranslationService::TRANSLATION_UPDATED = 5

Definition at line 30 of file TranslationService.php.