src/CoreBundle/EventListener/DcGeneral/EnvironmentPopulator/TranslatorPopulator.php
private function addInputScreenTranslations(StaticTranslator $translator, $inputScreen, $containerName)
    {
        $currentLocale = $GLOBALS['TL_LANGUAGE'];

        foreach ($inputScreen['legends'] as $legendName => $legendInfo) {
            foreach ($legendInfo['label'] as $langCode => $label) {
                $translator->setValue(
                    $legendName . '_legend',
                    $label,
                    $containerName,
                    $langCode
                );
                if ($currentLocale === $langCode) {
                    $translator->setValue(
                        $legendName . '_legend',
                        $label,
                        $containerName
                    );
                }
            }
        }
    }
private function addInputScreenTranslations(StaticTranslator $translator, $inputScreen, $containerName)
    {
        $currentLocale = $GLOBALS['TL_LANGUAGE'];

        foreach ($inputScreen['legends'] as $legendName => $legendInfo) {
            foreach ($legendInfo['label'] as $langCode => $label) {
                $translator->setValue(
                    $legendName . '_legend',
                    $label,
                    $containerName,
                    $langCode
                );
                if ($currentLocale === $langCode) {
                    $translator->setValue(
                        $legendName . '_legend',
                        $label,
                        $containerName
                    );
                }
            }
        }
    }
private function addInputScreenTranslations ( StaticTranslator $ translator , $ inputScreen , $ containerName ) { $ currentLocale = $ GLOBALS [ 'TL_LANGUAGE' ] ; foreach ( $ inputScreen [ 'legends' ] as $ legendName => $ legendInfo ) { foreach ( $ legendInfo [ 'label' ] as $ langCode => $ label ) { $ translator -> setValue ( $ legendName . '_legend' , $ label , $ containerName , $ langCode ) ; if ( $ currentLocale === $ langCode ) { $ translator -> setValue ( $ legendName . '_legend' , $ label , $ containerName ) ; } } } }
Add the translations for the input screen.

@param StaticTranslator $translator    The translator.
@param array            $inputScreen   The input screen.
@param string           $containerName The container name.

@return void

@SuppressWarnings(PHPMD.Superglobals)
@SuppressWarnings(PHPMD.CamelCaseVariableName)
Add the translations for the input screen .