0

I am working on a plugin and I need to have the word 'Author' appear in whatever language is set in the wordpress settings.

I have achieved this for the words: Posts and Pages using this code:

    $post_type = get_post_type_object( 'page' );
    $postTitle = $post_type->label;

How can this be done to get the label for 'Author'? I know that author is not a post type, so how can this be achieved? THANKS! :D

1 Answer 1

0

I suggest you take a look at: https://codex.wordpress.org/I18n_for_WordPress_Developers

You should probably just use a get_text function such as $author = __('Author');

1
  • Thank you oferwald for the suggestion, I am looking for a more direct solution that requires no specific translation by me or the user, because I know that somewhere WordPress has already translated this. May 25, 2015 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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