Javascript phrase parameters

Status
This content is read-only, or is not open for further replies.

stromb0li

Guest
offline
I'm trying to display a phrase via javascript (that takes a parameter), but I don't see the substituted value:

my_phrase has the following in my phrases.xml file: '{myParam} man'

XF.phrase("my_phrase",{"{myParam}":'weeee'})

Unfortunately, I only see my_phrase rendered on the page.

If I add this to my template, then everything works, but is it necessary to redefine the phrase in the template as well?
HTML:

Code:
<xf:js>
     XF.extendObject(XF.phrases,
        {
            myParam...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom