0

currently I have this code:

<?php _e( 'Follow ' . get_bloginfo( 'name' ) . ' on Facebook', 'yanse' ); ?>

But I just get Follow to translate and it echoes "Seguir 'Site name' on Facebook"

1 Answer 1

5

You can use sprintf:

echo sprintf( __('Follow %s on Facebook', 'yanse'), get_bloginfo('name') );
2
  • Thanks, I know. What I want to translate is the following text "on Facebook"
    – aurrutia
    Apr 18, 2016 at 4:34
  • I have updated the answer. Hope it work for you!
    – wpclevel
    Apr 18, 2016 at 5:17

Your Answer

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

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