WordPress.org

Ready to get started?Download WordPress

Forums

Unable to translate "Add Comment" and "Previous Entries" (11 posts)

  1. rasivert
    Member
    Posted 2 years ago #

    Are these sentences hard-coded into WordPress itself? How to translate them?
    Everything else on my site is perfectly translated, but these two expressions fell through.

    I'm using PageLines Framework and iBlogPro5 theme. I have been in touch with them about this, and their reply was this: "'Previous entries' and 'add comment' is part of wordpress so you can do a google search on translating that one"

    Can anyone please advice?

  2. Marventus
    Member
    Posted 2 years ago #

    Hi!
    Language is not hardcoded in WP since it supports localization into a broad variety of languages.
    What is likely to be happening is that those words are hardcoded in your theme. Try doing a search for those words inside your theme folder, and you will probably find the file(s) in question.
    Cheers.

  3. Simon Prosser
    Theme Review Admin
    Posted 2 years ago #

    I can guarantee no strings are hardcoded in the PageLines theme. Here is a snippet from the postnav section:

    <span class="previous"><?php previous_post_link('%link') ?></span>
    <span class="next"><?php next_post_link('%link') ?></span>

    That generates the previos and next links.

    And the code that draws the comments:
    <?php wp_list_comments(array('avatar_size' => 45)); ?>
    The string 'add comment' does not appear in the framework at all.

  4. rasivert
    Member
    Posted 2 years ago #

    If the string 'Add Comment' isn't part of the PageLines framework, and I have translated the default WordPress installation, what must I do to translate it?

  5. Simon Prosser
    Theme Review Admin
    Posted 2 years ago #

    Where do you see Add Comment? By default PageLines says 'Leave a Reply'?

  6. rasivert
    Member
    Posted 2 years ago #

    Under each heading:

    By <author> <date> in <category> ยท Add Comment [Edit]

  7. rasivert
    Member
    Posted 2 years ago #

    My site is located at http://www.svada.no (norwegian by default)

  8. Simon Prosser
    Theme Review Admin
    Posted 2 years ago #

    Ahh right the post meta, yes thats translatable.

    $defaults = array(
    			'zero' => __( 'Add Comment', 'pagelines' ),
    			'one' => __( "<span class='num'>1</span> Comment", 'pagelines' ),
    			'more' => __( "<span class='num'>%</span> Comments", 'pagelines' ),
    			'hide_if_off' => 'disabled',
    			'before' => '',
    			'after' => ''
    		);
  9. rasivert
    Member
    Posted 2 years ago #

    Thanks for the swift reply, Simon!

    Sorry for this stupid question but would I need to add that code to a file, or is it already there and I just have to edit it?

  10. Simon Prosser
    Theme Review Admin
    Posted 2 years ago #

    Er no you dont have to edit it. That code 'zero' => __( 'Add Comment', 'pagelines' ), is the translatable string.
    You have to translate the themes pot file and change it.
    I made a post about it http://www.pagelines.com/forum/discussion/17169/how-to-change-a-text-string-with-poedit.

  11. rasivert
    Member
    Posted 2 years ago #

    Thanks again. FYI: there are some missing images on the link you provided.

Topic Closed

This topic has been closed to new replies.

About this Topic