Forums

Localizing a theme, special tag (3 posts)

  1. RoseCitySister
    Member
    Posted 7 months ago #

    I am starting to localize my WordPress themes, and am using the localized version of Kubrick for 2.7 as a base. I understand most of what I need to do, using these two types of tags:

    <?php _e('Not Found', 'mydomain'); ?>
    
    <?php edit_post_link(__('Edit', 'mydomain'), '', ' | '); ?>

    What I'm having difficulty with are things this customized tag, which I use in all themes:

    <?php the_content("Continue reading " . get_the_title('', '', false)); ?>

    Is this correct?

    <?php the_content(__('"Continue reading " . get_the_title('', '', false)', 'mydomain')); ?>

    I would appreciate someone pointing me in the right direction. I am getting better at this but not good enough yet to figure this one out.

    Thanks!

  2. greenshady
    Member
    Posted 7 months ago #

    Use this:

    <?php the_content( sprintf( __('Continue reading %1$s', 'mydomain'), the_title( ' "', '"', false ) ) ); ?>
  3. RoseCitySister
    Member
    Posted 7 months ago #

    Greenshady, I want your baby! Thanks!

Reply

You must log in to post.

About this Topic