how to use
Language()->TablePhrase("test_item", "TblCaption");
in user script?
how to use
Language()->TablePhrase("test_item", "TblCaption");
in user script?
Your code to get table caption of the table “test_item” is correct, but you need to use the returned value, e.g. echo it or set it to a variable and then use the variable as you need.
in userfn.js??
Where did you put your code? You need to post your code for discussion.
totza2010 wrote:
in userfn.js??
Of course, not. You cannot put PHP code inside the Javascript file. It won’t work.Basically, if you want to change the table phrase globally, you may simply put your code in Language_Load server event. Otherwise, if you want to change on table basis, then simply put your code in Page_Load server event that belongs to the related table.