PHP 8.5.0 Alpha 4 available for testing

Voting

: six minus three?
(Example: nine)

The Note You're Voting On

titan at phpdevshell dot org
17 years ago
If you would like to create a .po file with include heredoc scripts inside curly brackets {} solution is as follows;

I want to translate what in here (test.php):
<code>
<?php
$EOF
= <<<EOF
{
$t->__('I want to translate this string.')}
EOF;
?>
</code>

You will have to use the xgettext (gnu utility) with the Python parser like so:
<code>
$ xgettext --default-domain=test --keyword=__ --keyword --language=Python test.php
</code>

The above terminal command might seem wrong with --keyword used twice, this is however correct.

<< Back to user notes page

To Top