So, I'm rewriting one of the older plugins and am trying to load an extra language file in the plugin's admin page, but seem to be missing something. I can't seem to find a function for it for loading custom files so I tried the approach that works in frontend.
In the admin page, right after the application_top.php line, I've added:
Code:
$languageLoader->loadDefinesFromFile(__DIR__.'/'.DIR_WS_LANGUAGES, $_SESSION['language'], 'mail.php');
The loadDefinesFromArrayFile() does trigger and it's pointing to the correct file (/path/to/admin/includes/languages/english/lang.mail.php), but I'm guessing it's failing because it's an admin file and is failing on line 50 of LanguageLoader.php because of the path it's pointing to catalog and not admin:
Code:
$this->fileLoader->loadFileDefineFile(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $language . $baseDirectory . '/' . $languageFile);
Any pointers would be appreciated. I'm trying to avoid putting the definitions from the original file into this page's lang file. TIA