• How to translate the phrases listed in the filters?

    I see in the FAQ

    A number of filters have been included, and more are to follow.

    The filters that are included (subject to change):

    // Filters “This post of part of the series: ” text
    post-series-manager-series-text

    // Filters the ” (Current)” text
    post-series-manager-current-text

    // Filters the “Continue reading this series:” text
    post-series-manager-next-text

    // Filters the “Other posts in this series:” text
    post-series-list-intro-text

    // Filters the start “

      ” tag
      post-series-list-opening-tags

      // Filters the ending “

    ” tag
    post-series-list-ending-tags

    But I don’t know how to use them. Can you explain in detail what files to change to have translation to another language. I tried to translate the pot file, but it doesnt’ have these strings

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dragon18

    (@dragon18)

    Seems author is not here. May be somebody else could help me?

    I inserted the following code into my functions.php

    //Filters "post of part of the series: " text
    
    function translate_series_content() {echo ("Эта статья является частью серии:");}
    add_filter ('post-series-manager-series-text','translate_series_content');
    
    // Filters the "Other posts in this series:" text
    function translate_series_other() {echo ("Другие статьи серии:");}
    add_filter ('post-series-list-intro-text','translate_series_other');
    
    // Filters the "Continue reading this series:" text
    function translate_series_next() {echo ("Следующая статья серии:");}
    add_filter ('post-series-manager-next-text','translate_series_next');
    

    But now all the translation texts are printed in the beginning of a post, and the links start next line. I had to insert remove filter to block “after” links, otherwise translation is in the beginning, and links is below the post.

    
    // Remove the shortcode that's automatically added before the content
    //remove_filter( 'the_content', array( $post_series_manager, 'post_series_before' ) );
    // Remove the shortcode that's automatically added after the content
    remove_filter( 'the_content', array( $post_series_manager, 'post_series_after' ) );

    I am new to WP and I am not a coder. Where are my mistakes?

    Thread Starter dragon18

    (@dragon18)

    One more question: how to translate “POST SERIES” text in the header of the list of series posts?

    Plugin Author Jeffrey de Wit

    (@cheffheid)

    So, I totally missed this because I don’t think I got an email notification for it? So sorry about that.

    I will look into this a bit further, because it’s entirely possible I need to update the pot file for you to properly add translations (it looks like I need to do a review of the translatable strings regardless, so thank you for this!). Expect an update on that within the next couple of days.

    Also, I believe you should also be able to submit translations through https://translate.www.ads-software.com/ now, which circumvents the need for translating the strings in the pot file and should make the language available for everyone.

    If you’re interested in exploring the translate.www.ads-software.com route, could you let me know if there are any strings missing from there?

    • This reply was modified 7 years, 8 months ago by Jeffrey de Wit. Reason: Clarifying what I need to review a bit more
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation of the plugin’ is closed to new replies.