Open OwenMelbz opened 6 years ago
Hi. This is the only way in version v3.x In v4 you can pass the options as an argument:
$translations = Translations::fromPhpCodeFile('my-file.php', [
'functions' => [
'_e' => 'gettext'
]
]);
@OwenMelbz You might be also interested in https://github.com/wp-cli/i18n-command and how we did that there.
Hi,
We're in the process of translating a prebuilt wordpress site that uses
_e
to echo translations.Currently we're using your extractor, by pushing a custom function to the extractor config using
Is there an official method/api to do this? Or would this be considered as acceptable?
Thanks