I am trying to use Jlayout in a plugin I am writing and everything works fine except that the Language Constants in the layout file are not being replaced.
My call to render the layout is;
$layout = new JLayoutFile($layoutname, $layoutpath); $body = $layout->render($data);
In my layout file I have:
<th><?php echo Jtext::_('COM_MEMBERSHIPS_FIELD_MEMBERSHIP_LABEL'); ?></th> <td><?php echo $displayData['membership']; ?></td>
If I dump $body after the render I get:
The '911' is the data expected for the field membership but I am expecting:
I have been chasing this problem for hours now and don't seem to be able to find anything that gives me any clues about what is going on.
What I can share is that the Constant is in the .ini file in both the site and admin language files as the constant is properly replaced in other Views.
My assumption is that for some reason the language files are not found in the Jlayout process, like I am missing a line or something that needs to include it, but I can't find any examples that show anything else is needed.
Thanks in advance,