Open medarob opened 7 months ago
Currently, even if I select "my_ext" in the dropdown I will only see *.xlf files located directly in the folder
EXT:my_ext/Resources/Private/Language/
. No subfolders are taken into account.
It seems that only up to 3 subfolders are considered and fetched. While theoretically this is okay, the recommended (and sometimes needed) way is to create all subfolders to make it work with other extensions. See last paragraph in https://docs.typo3.org/p/lochmueller/autoloader/7.2/en-us/Loader/LanguageOverride.html
Conclusion: The restriction of possible subfolders should be dropped or is there something we are missing?
Thank you @medarob for your input. Indeed, the overriding of labels is currently not directly supported. I plan to remove the useL10n mode and try to better support the overriding mechanism in the future. (As described here: https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Localization/ManagingTranslations.html#xliff-translating-custom).
Thank you for your answer.
With the currently merged change it's for now possible to show those manually created files in the EXT:my_ext/Resources/Private/Language/Overrides/News/Resources/Private/Language/
folder.
Another idea for that issue which just came to my mind: Not sure if that is too much but how about an option where you can set the folder depth with TypoScript?
Anyways, it would be good if the user could override existing language files from 3rd party extension. So, in an "override"-mode a subfolder structure will be created in the Overrides
folder.
It would be good if this path for the Overrides
folder is configurable? Then, if the path is located in an extension, a new entry in ext_localconf.php
will be automatically created (so you don't have to manually create it). If the path for the Overrides
is not located in the extension, then new entries will be added to the AdditionalConfigration.php
.
Maybe I missed something but there is the following scenario:
I want to override the labels of another extension, for example
ext:news
.As described here https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/Localization/ManagingTranslations.html#xliff-translating-custom in
EXT:my_ext/ext_localconf.php
I have the following entry:$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:news/Resources/Private/Language/locallang.xlf'][0] = 'EXT:my_ext/Resources/Private/Language/Overrides/News/Resources/Private/Language/locallang.xlf';
The new file
de.locallang.xlf
(located in the same folderEXT:my_ext/Resources/Private/Language/Overrides/News/Resources/Private/Language/
) has the following content:So, just the text for two keys have been changed. But, when I open the translation files from the news extension in the locallang extension, I get only the original english text without the German translation.
What do I have to change so that the extension will pick up the Overrides folder from my extension with the current changes?
Changes should also be written in the
EXT:my_ext/Resources/Private/Language/Overrides/News/Resources/Private/Language/
folder.Currently, even if I select "my_ext" in the dropdown I will only see *.xlf files located directly in the folder
EXT:my_ext/Resources/Private/Language/
. No subfolders are taken into account.I think there needs to be another override mode to be implemented?
Currently the user only has the option to