Bug #87154
closedTranslations for custom Extension not working in other languages than
0%
Description
I have the following problems with translations in a custom extension in TYPO3 9.5.1:
In the frontend I only get translations for the standard language (0) and German (1). The other 2 additional languages (es, fr) are ignored and the default language is output instead.
I use the translations as follows, both in the fluid template and directly in the controller, for flash messages, etc.
PHP:
$this->addFlashMessage (LocalizationUtility :: translate ( 'message.emailinvalid', 'custom forms'));
FLUID: {f:translate (key: 'label.company', extensionName: 'Customforms')}
This works fine, but only with English and German, with the ID 0 and 1.
After checking all the settings and paths several times, unfortunately, I can not find the error.
Background info:
- TYPO3 Version 9.5.1
- Sites and languages are set up correctly
- All language files are available, see screenshots.
- The website is multilingual
- Normal contents are output correctly in all 4 languages
If necessary, I can show a link via PM, but I can not post it here unfortunately.
I can provide a URL to the website if neccessary, on request.
Files
Updated by Simon Köhler almost 6 years ago
I have now installed the same extension in a TYPO3 version 8.7.18 and it works there without any problems. All translation labels are shown in the correct site language.
Updated by Simon Köhler almost 6 years ago
- Complexity set to nightmare
Now I've created a demo extension to make sure it's not a bug in my extension. The extension was created under TYPO3 8.7 with the extension builder, and only a few parts removed, as well as language files for DE and ES added and translated.
I ask the community for help: Could someone test the Ext. Times in both 8.7 and 9.5, and confirm the behavior?
Here is the link to download:
http://simon-koehler.com/localizationtest.zip
It just has to be installed and the static TypoScript embedded in the template. Then you can create a plugin "Localization Demo" and call it in the frontend. It should then contain a text in the respective language.
Languages are integrated: English, German, Spanish, where EN is the default language.
It works fine with TYPO3 8.7, but not with TYPO3 9.5.xx. The same error occurs as previously described.
I really hope that somebody will take care of it before our customer does not take us seriously anymore and jumps in the middle of the project. It is really urgent. I can not do more at this point. A donation or even payment would be possible, but if it is a core bug I think I have bled enough for it myself and experimented for days already! That would possibly compensate for that.
Updated by Simon Köhler almost 6 years ago
Ok, sorry for confusing everyone. Problem solved, I had set the site setting "Language Key for XLF Files[typo3Language]" to default by accident! Too much stress, too less experience with the new TYPO3 version. The Issue can be closed. Thanx to Georg Ringer for the solution!
Updated by Stephan Großberndt almost 6 years ago
- Status changed from New to Closed