Thanks for the clarity Joshua!
So ANYPLACE in the site (not just in the post meta) where the text created by ‘Category: %s’ appears would be translated to ‘Posted in %s’ (as long as its wrapped in __( ), _e(), _x() …etc)?
This works fine in this case, but I’m not sure it’s a great overall solution because the alteration might only be required on a certain page or in a certain location, and not in EVERY place the word or phrase is generated (e.g. I don’t think it can’t be restricted to a TOP post meta section ONLY.)
Is the ‘!is_admin’ restriction included just so it only appears to non-admin users?
Since you are using a conditional to restrict to non-admins, I assumed you could add other conditionals to restrict the altered translation to certain pages or post categories. So I modified the function to include the translations for BOTH the Post Meta and the Category Title (but ONLY if the category title was on a certain Category display). And this works great:
// Change some translations
function translate_meta( $translation, $text, $domain ) {
$translations = &get_translations_for_domain( $domain );
// change 1 - Changes Category to Posted in - for post meta
if ( $text == ‘Category’ && !is_admin() ) {
return $translations->translate( ‘Posted in’ );
}
//end change 1
// change 2 - Changes Category to Whoo Hoo! for Category Titles ONLY if category is my-category
if ( is_category(‘my-category’) && $text == ‘Category: %s’ && !is_admin() ) {
return $translations->translate( ‘Whoo Hoo! %s’ );
}
//end change 2
return $translation;
}
add_filter( ‘gettext’, ‘translate_meta’, 10, 4 );
I’m posting it for your opinion and to flesh out the thread. Thanks again for all your help.