WordPress.org

Ready to get started?Download WordPress

Forums

older posts text change (6 posts)

  1. xenolith5
    Member
    Posted 1 year ago #

    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

  2. dwnmedia sarl
    Member
    Posted 1 year ago #

    Normaly it is in the .PO file yes
    which template are you using, your own?

  3. xenolith5
    Member
    Posted 1 year ago #

    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

  4. keesiemeijer
    moderator
    Posted 1 year ago #

    '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

  5. dwnmedia sarl
    Member
    Posted 1 year ago #

    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)

  6. xenolith5
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic