Rendering/translating

Rendering/translating

dthdth Posts: 1Questions: 1Answers: 0

Hi,

I am trying to find the best way to express for instance boolean values as "Yes" and "No". Data is coming from JSON object properties.

Using data: 'active', render:'function (data) { return data ? "Yes" : "No"; }' gives me the error popup that the value for "active" cannot be requested.

The property is in the JSON data. I have confirmed this by removing the value for the render option. Then it works (but showing as "true" and "false" of course).

What is the best way to make such translations - could also be language translations? If the above approach is recommended, then why does the presence of a function in the render option give an error for requesting the value?

Thanks in advance.

This discussion has been closed.