• Hi

    There’s a lot of default texts i can’t seem to change on the theme. They´re not at the .mo and .po files, and i’d like to know where i can find them inside the files.

    The texts are:

    Next Page / Previous Page (under the posts at home)
    Leave a Reply (comments section)
    Post Comment (at the button)

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi,
    just a hint, these labels are not on theme level:
    -“Leave a Reply” and “Post Comment” are parts of standard post form on WP level, you can find it in \wp-includes\comment-template.php
    -“Next / Previous” are also on WP level in \wp-includes\post-template.php
    Unfortunately, I had no need for such translation, so I cannot give you final solution.Obviously, this is not translated in Hueman .po files, so it uses default values from WP PhP files.
    Some google-ing based upon this info:
    http://wordpress.org/support/topic/how-to-change-wording-of-leave-a-reply?replies=39 (different theme, same problem).
    Looks like it’s not wise to change original PhP files.
    Hope this hint helps a bit, maybe Alex will drop by soon:)

    Thread Starter filipetx

    (@filipetx)

    Thanks Mike,

    I found the strings at those PHP files you told me, and i changed it, but its not reflecting at the actual blog…

    If you read carefully above, I said it’s just a hint, not a solution.
    The link I sent also suggests not to change WP core files directly.
    My advice: leave original WP PhP files as they are, changes should be made in Hueman theme (or best, in child theme if possible).
    Solution is not simple, as I see.
    I’m very busy at the moment for serious “investigation”, but since you intrigued me, I’ll try to find solution and get back ASAP.
    Until then, leave this open, and play only with local install (XAMPP for Win for example) – not on live site!
    Mike

    OK, took me some time but:
    A- first solution for “Leave Reply” & “Post Comment”,
    -undo all changes in WP core files you made
    -make child theme (if you don’t know how, take a look on this forum, many times explained)
    -in your Hueman child you will have almost empty functions.php
    -anyway, create it if doesn’t exist, it should look like this:

    [ Moderator note: code block fixed. ]

    <?php
    //Changes WP contact form labels
        function change_comment_form ($arg) {
            $arg['title_reply'] = __('Hello World!!!!');
            $arg['label_submit'] = __('Hello World!!!');
        return $arg;
        }
        add_filter('comment_form_defaults','change_comment_form');
    ?>

    Instead of Hello World put string you need for title and button label.

    B- – I don’t have “Next/Previous page” on home page, but like on http://demo.alxmedia.se/hueman/ “Page n of n”- that’s plugin WP-Pagenavi that Alex suggests to be activated.
    If you do it (and you should, since author suggests it), translation is easy:
    – go to wp-content\plugins\wp-pagenavi and edit file “wp-pagenavi.php”
    This is easiest (can be done from child theme, but I really don’t have time now). Just take into account that on next WP-Pagenavi plugin update you will loose that modifications.

    So, hope this helped, first solution is safe – touching WP core files is a no no 🙂
    Please mark this [resolved] and good luck with translating,
    Mike

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Mike? Thanks for all the great help but could you wrap code blocks in the backtick character? Using blockquote messes with the formatting. 😉

    http://codex.wordpress.org/Forum_Welcome#Posting_Code

    Well, I did now 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘i can't change / translate some text’ is closed to new replies.