How to use Language()->TablePhrase()?

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
totza2010
User
Posts: 109

How to use Language()->TablePhrase()?

Post by totza2010 »

how to use

Language()->TablePhrase("test_item", "TblCaption");

in user script?


arbei
User
Posts: 9384

Post by arbei »

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.


totza2010
User
Posts: 109

Post by totza2010 »

in userfn.js??


arbei
User
Posts: 9384

Post by arbei »

Where did you put your code? You need to post your code for discussion.


mobhar
User
Posts: 11726

Post by mobhar »

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.


Post Reply