Support » Fixing WordPress » older posts text change

  • Hi, another newbee here who’s learning very quickly about all the template files and php coding but I’m stuck on the ‘Older Posts’ text that appears after posts to link to the archives.
    I need to add _e somewhere as I need it to appear in the Welsh language when chosen. The rest of my site translates ok so this may not be in the .mo file.
    I’ve looked at index.php, functions.php, themater.php and various post.php templates but can’t find what I’m looking for!

    Any ideas would be appreciated



Viewing 5 replies - 1 through 5 (of 5 total)
  • Normaly it is in the .PO file yes
    which template are you using, your own?

    Hi dwnfred thanks for reply. I found where the code is and it reads this:

    <?php next_posts_link( __( '<span>&laquo;</span> Older Posts', 'themater' ) );?>

    I’ve changed ‘Older Posts’ to ‘Archive’ and this displays on both the English and Welsh language pages.

    I thought the ‘__’ at the start of __( '<span>&laquo;</span> Archives', 'themater' ) );?>
    would cause ‘<< Archives’ to be translated to ‘<< Archif’. Archives already translates to ‘Archif’ (Welsh)elswhere on the site ok.
    What does the option ‘themater’ do?


    Moderator keesiemeijer



    ‘themater’ is the text domain of your theme.

    To translate plugins and themes I use this plugin:
    It can scan your theme’s text domain for all translatable strings and create po and .mo files.


    themater is probably the name of your template

    btw cool plugin, I didn’t know this plugin to easily edit your translation

    normally i created in my own my .po/mo files and translated what i need to translate ;0)

    Thanks for links and help keesiemeijer and dwnfred.

    I’ve found that if I replace the code above to:
    <?php next_posts_link( __( 'Next Page &raquo;', 'themater') );?>
    then the translation works.
    Unfortunatley the codestyling-localization doesn’t have the Welsh Language file and for some reason doesn’t detect it in my Theme.
    The last problem I have now is that the Welsh po/mo file does not have the string ‘Older posts’ or ‘Newer posts’ so I can’t translate to what I want.
    It will have to be ‘Next page >>’ / ‘Tudalen Nesaf >>’ for now!!

    Thanks again

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘older posts text change’ is closed to new replies.