These docs are for v3.5. Click to read the latest docs for v5.0.

Discussions

Ask a Question
Back to All

Using localization in jQuery functions

Hi,
is it possible to use localization in jQuery functions?

Example: I have a localization file (localization.de-at.json):

{
  "ExpandAll":"Alle ausklappen",
  "CollapseAll":"Alle einklappen"
}

I want to use the dnnExpandAll jQuery plugin like this:

  $("#DemoPanel .dnnFormExpandContent a").dnnExpandAll({
     targetArea: "#DemoPanel",
     expandText: "{{Localization.ExpandAll}}",
     collapseText: "{{Localization..CollapseAll}}"
  });

But this does not work. How do I achieve this?