Translation is not being output in one instance


I am creating translation for a custom theme and specifically custom template file of the theme and user Poedit to create the pot template.

After translating the file one line in the template won’t translate no matter what I do.

<?php echo __( 'Featured', 'mytextdomain' ); ?>

Possibly helpful additional info:

  1. this line isn’t located within wordpress loop.
  2. If I remove echo part and leave only __() it wont even output word "Featured" in English
  3. I substitute echo__() with _e() "Featured" outputs.

Similar issue also custom "read more" form functions.php isn’t translated.

function new_excerpt_more($more) { global $post; return ' &hellip;' . __('<a class="more-link" href="'. get_permalink($post->ID) . '">Read More</a>'); }

There’s got to be something I’m doing wrong here since everything else translates and outputs except these two instances.

any ideas what am I doing wrong?

annkswe 2 months 0 Answers 14 views 0

Leave an answer