[RSS Feed/News] Is it possible to use Xenforo's phrase system inside javascript?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Let's say I've this code:

JavaScript:

Code:
var Asprin = window.Asprin || {};

/** @param {jQuery} $ */
!(function($, window, document, _undefined) {
  'use strict';

  Asprin.Foo = XF.Event.newHandler({
    eventType: 'click',
    eventNameSpace: 'Foobar',

    init: function() {
    },

    click: function(event) { 
        // call \XF::phrase() here?
    },
  });

  XF.Event.register('click', 'blahblah', 'Asprin.Foo');
})(jQuery, window, document);

One alternative I can think of is fetching the...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom