views:

140

answers:

1

I'm using PHPTAL in my project I'm able to successfully implement it almost all the cases except when I want to use its i18n services. I constantly get errors "Call to a member function on a non-object"

I've tried searching the net forums etc. but not found any solution, will really appreciate if somebody can help me out.

+2  A: 
rashid2538
+1 for answering your own question. :)
Andrew Coleson
You don't need to modify PHPTAL's constructor — you can set translator anytime before `execute()`.
porneL
Setting translator inside PHPTAL's constructor will reduce the overhead of setting it in every php file before execute().
rashid2538