How do they work?
Basically I want to load text strings from admin.english.php to work in my subs.php, however how do i do that?
loadLanguage('Admin');
That loads a language file. Replacing "Admin" with the name of the language file, dropping .language.php, obviously.
Then you can call up strings contained in the file below.
Labradoodle-360
Just pop that in subs.php?
Well, not just anywhere. But as long as it's in the function where you need to use the strings, yes.
I'm tring to load it to the menu, so this function right?
function setupMenuContext()
Try this.
./Sources/Subs.php
function setupMenuContext()
{
global $context, $modSettings, $user_info, $txt, $scripturl;
// Load the Admin Language File...
loadLanguage('Admin');
Works perfectly, Thanks Labradoodle-360!
Not a problem...glad you got it! :)
Marking topic as resolved.