Bug #95212
Updated by RVVN no-lastname-given over 2 years ago
Hi, following the official documentation ( [[https://docs.typo3.org/c/typo3/cms-form/master/en-us/I/Concepts/FormPlugin/Index.html#translation-of-form-plugin]] ) to translate the form plugin in backend, I set my YAML configuration like this : <pre><code class="yaml"> TYPO3: CMS: Form: prototypes: standard: formEngine: translationFiles: # custom translation file 20: 'EXT:my_site_package/Resources/Private/Language/Database.xlf' </code></pre> But this file is never used. I found in Form TranslationService (line 191 for version 10.4) that the translationFiles array is not replaced by a key-descending-sorted array (returned value from "sortArrayWithIntegerKeysDescending" method) <pre><code class="php"> $this->sortArrayWithIntegerKeysDescending($translationFiles); </code></pre> The translationFiles array remains the same, so the XLIFF file from the Form extension (at index 10) takes precedence over additional custom ones. A fix could be : <pre><code class="php"> $translationFiles = $this->sortArrayWithIntegerKeysDescending($translationFiles); </code></pre> Note : version 11 is affected too.