• 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

    Thanks

    Gavin

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

    Thread Starter xenolith5

    (@xenolith5)

    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?

    Thanks

    Moderator keesiemeijer

    (@keesiemeijer)

    ‘themater’ is the text domain of your theme.
    http://codex.wordpress.org/Translating_WordPress#Localization_Technology

    To translate plugins and themes I use this plugin: http://wordpress.org/extend/plugins/codestyling-localization/
    It can scan your theme’s text domain for all translatable strings and create po and .mo files.

    tutorial

    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)

    Thread Starter xenolith5

    (@xenolith5)

    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.