Questions tagged [xgettext]
The xgettext tag has no usage guidance.
2
questions
2
votes
1answer
687 views
How does gettext works for translating readme file of plugin?
I am doing translation of my plugin. I am using __ & _e in php files. But can't figure out how to do same for readme.txt file? Is it's content on Wordpress site's plugin page automatically get ...
0
votes
1answer
1k views
Can't we use strings defined as PHP constants if we want to translate them in a plugin?
I want to translate constant strings in my plugin defined as:
define( 'CONSTANT', __( 'string-A', 'textdomain' ) );
And later using it somewhere like:
$x= '<h4>'.CONSTANT_NAME.'<h4>'; echo ...