I have a nested list in my MVC application. Part of the template (getItemTextTpl) needs to be translated according to the current language.
This requires dynamically changing (or over-riding) the getItemTextTpl function.

I have tried all ways to do this - both in the view, and in the controller, but it just doesn't change.

Is this possible? How would it be achieved?

My latest attempt is this (in the controller):
   return '<div>...</div>';
Although this does alter the template, it's not getting the (node) parameter, so I can't do conditional formatting.