R
ragtek
Guest
It would be great, if we could add js phrases via an static method global from everywhere (controller, template hook,..)
For example:
XenForo_Helper::addPhraseToJS('ragtek_foo');
which would generate the code and insert it into the page_container_js_body phrases part
(Coders are lazy )I don't like to use the page_container_js_body template hook and search replace there, only to add 1 phrase...
For example:
XenForo_Helper::addPhraseToJS('ragtek_foo');
which would generate the code and insert it into the page_container_js_body phrases part
Code:
jQuery.extend(XenForo.phrases,
{
cancel: "{xen:jsescape {xen:phrase cancel}}",
Upvote
1