Read more translation

Support Area Forums Elite Read more translation

Viewing 4 posts - 1 through 4 (of 4 total)
URL to the page in question: http://localhost
  • Author
    Posts
  • #25029
    Avatar photoJazz Lover
    Participant

    Hello Bill,

    Found out the “Read more” tag triggered by <!–more–> tag in posts does not appear translated in multipost page. I found all three strings in .pot file and all of them translated.
    The only concern is regarding <span class=\”more-link\”>Read more</span> string, I’m not sure it matches the <!–more–> tag (translated). Maybe this is the issue.

    I couldn’t find in options how to change the tag. In previous theme (Atahualpa) there is an option even include post title in the tag (not needed though).

    Could you please suggest any fix for it?

    Thank you!

    #25030
    Bill Robbins
    Moderator

    Hello Jazz Lover,

    I believe that is the right spot. What WordPress does with the more tag is apply the text that’s inside the_content() and cut the rest of the page/post off at that point. In Elite it occurs in three files: index.php, single.php and single-staff.php and looks like this:

    
    <?php the_content(__('<span class="more-link">Read more</span>', 'elite')); ?>
    

    In the POT file for version 2.1.0, this is the corresponding spot:

    
    #. Text in function
    #: elite/index.php:38
    #: elite/single-staff.php:31
    #: elite/single.php:29
    msgid "Read more"
    msgstr ""
    

    See if that won’t let you translate the text to something else.

    Take care,
    Bill

    #25046
    Avatar photoJazz Lover
    Participant

    Hello Bill,

    Thank you for input. My first idea was the new .pot file different from the previous version (copied it in the child-theme a while ago). I translated it again and nothing changed. It seems like the string in the .pot file to “Read more” tag in the index.php missed. But since I’m not quite familiar with WP loop I’m not sure.

    So, I had simply replaced “Read more” text in the index.php with the translated text (be sure to save the file with UTF-8 encoding for non-latin characters), and it did the trick.

    Since I’m not using staff or woocommerce functions on my site, that’s all.

    Thank you again, Bill. Your support is awesome!

    Cheers,

    Vitaly

    #25057
    Bill Robbins
    Moderator

    Good Morning Vitaly,

    I’m glad you tracked it down. I realized recently that I needed to handle the translation strings a bit differently that I used to. Before I had used organizedthemes as the text domain, but it needed to be the theme’s folder name. I believe elite was our first theme to change that, but the others will eventually be altered.

    If you need anything, just let me know.

    Have a great weekend,
    Bill

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Read more translation’ is closed to new replies.