make AbstractPlugin::pi_loadLL load labels from custom file
Right now AbstractPlugin::pi_loadLL looks for hardcoded
language.xml file in the scirpt directory "scriptRelPath".
'EXT:' . $this->extKey . '/' . dirname($this->scriptRelPath) . '/locallang.xlf';
This doesn't allow to use Extbase like structure for pi-based extensions (placing language lables in Resources/Private/Language
In few places in the core, we still keep scriptRelPath containing wrong value (script location and name has already changed during namespace change). And the only reason for it is that we need this property for loading language files.
The solution would be to make AbstractPlugin::pi_loadLL take an optional argument pointing to the correct loaction of the language file.
[FEATURE] Allow AbstractPlugin::pi_loadLL to load custom language file
Add optional parameter to pi_loadlLL method to allow loading
language files located somewhere else than $this->scriptRelPath folder.
This change allows to place language files in Resources/Private/Language
also in pi-based plugins.
Reviewed-by: Alexander Opitz <email@example.com>
Tested-by: Alexander Opitz <firstname.lastname@example.org>
Reviewed-by: Xavier Perseguers <email@example.com>
Tested-by: Xavier Perseguers <firstname.lastname@example.org>