I'm developing a plugin which uses strings of the "default" textdomain, but several strings will not shown translated.
My locale language is "de_DE" (german). I try to access the word "Count", which is available inside the "admin-de_DE.po" file. (To make sure, the loaded .mo file is actual, I compiled it with Poedit and Loco for debugging.) Other strings of that file will be shown translated, for example "[Pending]" as "[Ausstehend]", but not "Count" as "Anzahl".
What is my mistake?
add_action( 'admin_init', 'action_admin_init' );
function action_admin_init() {
_e( 'Count' );
}
I'm developing a plugin which uses strings of the "default" textdomain, but several strings will not shown translated.
My locale language is "de_DE" (german). I try to access the word "Count", which is available inside the "admin-de_DE.po" file. (To make sure, the loaded .mo file is actual, I compiled it with Poedit and Loco for debugging.) Other strings of that file will be shown translated, for example "[Pending]" as "[Ausstehend]", but not "Count" as "Anzahl".
What is my mistake?
add_action( 'admin_init', 'action_admin_init' );
function action_admin_init() {
_e( 'Count' );
}
Share
Improve this question
asked Jul 16, 2019 at 8:29
TahtuTahtu
1173 bronze badges
1 Answer
Reset to default 0The only instance of "Count"
I can see in the default domain's admin file has a context value of "Number/count of items"
. So your code should be:
add_action( 'admin_init', 'action_admin_init' );
function action_admin_init() {
_ex( 'Count', 'Number/count of items' );
}
Ref: _ex.