I'm trying to get Smarty and gettext to work together in a project of mine. Currently smarty uses .tpl
files for its template system.
I use PoEdit for creating catalog files and I've added '*.tpl' to the file extensions under PHP but when I try to scan for gettext strings I get the following errors and it is not able to find my strings:
xgettext: warning: file
../libs/smarty/debug.tpl' extension
tpl' is unknown; will try C
xgettext: warning: file../template/login.tpl' extension
tpl' is unknown; will try C
xgettext: warning: file../template/index.tpl' extension
tpl' is unknown; will try C
Well how can I get it to work?
(What you have mentioned should work). Make sure it's saving correctly.
Edit > Preferences > Parsers
Select PHP
Enter in the allowed extensions...
.php;.tpl
Note: You also might need to update your parser command to include:
xgettext --language=PHP --force-po -o %o %C %K %F
After a day of trying to install smarty parser with no success I have edited the Perl in
Edit > Preferences > Parsers
So to the list of extensions I added *.tpl
*.pl;*.tpl
It parses now all {_("text")} inside smarty tpl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With