-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extractors\PhpCode does not extract d__() and other domain-related gettext functions #108
Comments
Yes, you're right. This is something that I have in the roadmap but I couldn't find any time yet to implement. |
Thanks! |
First off, thanks for the update. Am I doing this right? I wish to load two domains and then use
When I run Seems like the class is failing here. Does I even tried loading just one domain and it still does not work. Is there something else I'm missing? |
Yes, if I comment out |
The use Gettext\Translations;
//Create a empty Translations
$translations = new Translations();
//Set the domain
$translations->setDomain('local');
//Extract the entries of this domain:
$translations->addFromPhpCodeFile('path/file.php');
//Save the file
$translations->toMoFile('path/to/local/domain/Locale/en/LC_MESSAGES/messages.mo'); |
The reason of |
Thanks! Got it working! |
Extractors\PhpCode
does not appear to be able to extractd__()
and other domain-relatedgettext
functions.The text was updated successfully, but these errors were encountered: