convert entity value to text representation.
The context include global variables.