Forums

Help with next_posts_link! (3 posts)

  1. anselmiina
    Member
    Posted 2 months ago #

    I’m trying to create a bilingual blog and almost everything is working perfect. I have just one little problem, I don’t know how to translate the "next page" link.

    I’m talking about the link in the end of the index.php, <?php next_posts_link() ?>

    Usually the plugin translates automatically everything inside (), the translation comes from mo-file in chosen language. But when I don’t write anything inside the (), Wordpress prints "Next Page »" instead of the translation. I have even opened the po-files in Poedit and checked that there really is a translation for "next page" in both of languages I’m using.

    If my blog was written in one language, it would be easy to write <?php next_posts_link('TRANSLATED LINK') ?> but because it is possible to chance the language of my blog, I can’t write anything myself but Wordpress should print the translation automaticly.

    I hope someone can help me. I think this is not about the plugin (I’m quite sure that it is just me who doesn’t have any idea what I’m doing...) but the plugin I’m using is called Polyglot.

  2. mfields
    Member
    Posted 2 months ago #

    Have you tried:
    next_posts_link( __( 'Link Text' ) );

  3. anselmiina
    Member
    Posted 2 months ago #

    Thank you so much for help! Actually I learned something very useful thanks to your tip, I found my way to http://codex.wordpress.org/Translating_WordPress.

    This was the solution for my problem (I just checked the exact form of next page link in the po-file):

    next_posts_link( __( 'Next Page &raquo;' ) );

Reply

You must log in to post.

About this Topic