0

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' );
}
0

The 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.