Open bhsmither opened 8 months ago
Nope.
CubeCart's execution sequence requests that templates be compiled and delivered (fetch and display) as each part of the complete page is processed. This requires LANG to be holding the language array very early in that execution sequence.
A few years ago, I did a thought experiment of what would happen and how to do it, to move all fetches and displays to the very last possible moment. Smarty would have all the variables at the ready, cached components available from previous executions, etc, etc.
With the ultimate goal of getting a new phrase, or more to the point, a changed phrase into Smarty's variable LANG, specifically via hook or snippet code, the specific step
Language->assignLang()
seems to be required each and every timeLanguage->_language_strings
is modified.Currently,
assignLang()
is called viaLanguage->setTemplate()
, relatively early, before many locations where hooks load.I am experimenting with moving
assignLang()
out ofsetTemplate()
and intoLanguage->__destruct()
.(Note: when a hook from a plugin is loaded, if necessary, the plugin's language file is processed and
assignLang()
is called.)