$poFile
$poFile : \Geekwright\Po\PoFile
PoInitPHP provides 'msginit' like logic which can take a Smarty template file, recognize gettext like function tokens, and capture the translatable strings in a PoFile object.
The Smarty functions are expected to be in the format: funcname(msgid="message" msgid_plural="plural message" msgctxt="context") The specifics of the function ('funcname') and the argument names ('msgid', 'msgid_plural', and 'msgctxt') can be specified.
A properly initialized Smarty v3 object is required.
$poFile : \Geekwright\Po\PoFile
$gettextTags : string[]
$pgettextTags : string[]
$ngettextTags : string[]
$msgidArgNames : string[]
$msgidPluralArgNames : string[]
$msgctxtArgNames : string[]
msginitString(string $source, string $refname) : \Geekwright\Po\PoFile
Inspect the supplied source, capture gettext references as a PoFile object.
string | $source | php source code |
string | $refname | source identification used for PO reference comments |
__construct(\Smarty $smarty, \Geekwright\Po\PoFile|null $poFile = null) : mixed
Set the Smarty and PoObjects to use in the Init process
\Smarty | $smarty | a fully initialize Smarty 3 instance |
\Geekwright\Po\PoFile|null | $poFile | a PoFile object to be used in msginit |