Support » Fixing WordPress » Unable to translate "Add Comment" and "Previous Entries"

  • 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?

Viewing 10 replies - 1 through 10 (of 10 total)
  • 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.

    Simon Prosser

    (@pross)

    Theme Review Admin

    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.

    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?

    Simon Prosser

    (@pross)

    Theme Review Admin

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

    Under each heading:

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

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

    Simon Prosser

    (@pross)

    Theme Review Admin

    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' => ''
    		);

    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?

    Simon Prosser

    (@pross)

    Theme Review Admin

    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.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Unable to translate "Add Comment" and "Previous Entries"’ is closed to new replies.