#4 TSmarty2c.class.php

1.1.0
wont-fix
nobody
None
5
2014-04-08
2007-11-08
Internia
No

Class to rips gettext strings from smarty template

Because I have problems to use php from the command line, I have converted tsmarty2c.php script into a class. This way we can use it from a script that it can be visited with an explorer.

I have writed this class using php4 rules, looking for compatibility.

------
Usage:
------
//Example1:

$tsmarty2c = new TSmarty2c();
$tsmarty2c->Run("templates");

//Example2:

$tsmarty2c = new TSmarty2c();
$tsmarty2c->Run(array("file1.tpl", "file2.tpl"));

//Smarty open tag, close tag and command can be
//changed as well as extensions in the constructor
$tsmarty2c = new TSmarty2c('[', ']', 'translate', array('tpl','html'));

//Output file can be named as you want
$tsmarty2c->Run("templates", "name.ext");

Discussion

  • Internia
    Internia
    2007-11-08

    Class to rips gettext strings from smarty template

     
    Attachments
  • Hello,

    you may have not noticed by the project just go a new owner :)

    its forge is here https://forge.fusiondirectory.org/projects/smarty3-i18n and i was about to look at all the patches and include them if worthwhile.

    Could i ask you to take an account there and submit all your patches so we can include it.

    We already published a 1.0 with some of the patches we collected

    Cheers

     
  • Elan Ruusamäe
    Elan Ruusamäe
    2014-04-08

    • status: open --> wont-fix
    • Group: --> 1.1.0