Questions tagged [xgettext]

The tag has no usage guidance.

1
vote
1answer
270 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
367 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 ...