• Resolved ianpurves

    (@ianpurves)


    I have a number of translations in different languages and have yet to translate so they are all in “English” … I have not activate translation for Stong Testimonials.

    However I have used WPML string translation to translate “Read More” and “Read More Tesimonials” links.

    The odd behavior is that on a German page “Read More” translates to “Weitere Kundenbewertungen lesen” which is “Read more tesimonials” … I have check the string translation and it is correct.

    Also this “Read More”/”Weitere Kundenbewertungen lesen” link points to a German version of the full testimonial (which doesn’t exist).

    However the correct “Read more tesimonials”/”Weitere Kundenbewertungen lesen” link (again on the German page) points correctly to the English page with a full testimonial set … not a missing German one.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    The read-more-page will link to a translated page only if it exists, thanks to WPML.

    Conversely, the read-more-post assumes you have a translated version. I will look into making that more “intelligent” so as not to 404.

    Questions:

    1. What versions of WPML & String Translation are you on?

    2. I understand you haven’t translated them, but have you duplicated them via WPML? Or do you have only one set (which it understands as being in your main site language, English)?

    When I have only one set, no testimonials appear in other languages. I cannot reproduce your slider on the home page without creating a second set via WPML.

    3. In view ID 4, in Fields > Content, what is the “Read more” link text?

    Thread Starter ianpurves

    (@ianpurves)

    Chris

    Thanks for the response

    1. WPML 3.8.4 String 2.6.3
    2. Not duplicated only one set in English (strings have been scanned; on individual Testimonials “Multilingual content setup”: Make ‘testimonials’ translatable [unticked]
    3. “Read more” is in view ID 4, in Fields > Content

    I thought WPML managed things but it seem odd that the string tranlsation is wrong and action also wrong? I am assuming in order to translate Testimonials I tick the box on one individual Tesimonial and it all becomes obvious? I can’t see a global option to make all testimonial translatable?

    Thanks

    Ian

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Thanks for the info.

    I forgot about the “Make testimonials translatable” option. That will make them all translatable.

    Or in the global settings, if you do not have the Translation Management plugin installed, go to Translation options and look for “Custom posts”.

    Separately, if you want to translate the “testimonial” slug, enable “Custom posts slug translation options” then look for “URL slug: wpm-testimonial” in the WordPress domain in String Translation.

    If you do have Translation Management installed, look for those same settings on the Translation Management > Multilingual Content Setup tab.

    If you find the UI confusing, you’re not alone. 🙂

    Regarding the string translation: You found a bug. The read-more-post and read-more-page are using the same translation filter. I will fix that in the next update slated for next week.

    Regarding the action: Again, the read-more-post assumes you have a translated (i.e. duplicated) version. WPML intelligently handles blog posts in the main loop but not secondary loops like testimonials.

    I don’t know if my plugin can ask WPML if a translated version exists in order to decide how to construct the link but I will find out.

    The quick fix is to at least duplicate your testimonials via WPML. Then you will need to translate the “testimonial” slug.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    I was mistaken.

    1. Slug translation is forced by the presence of the plugin’s language files. The option to translate custom slugs via string translation seems to be ignored in that case.

    The quick fix I mentioned will work but you don’t need to translate the slug.

    Instead of duplicating the testimonials, a simpler quick fix would be to translate the slug “erfahrungsbericht” back to “testimonial”. The post links will still contain the language code “de” but it won’t 404.

    Example: …/de/testimonial/groetjes-van-kaapstad/

    2. In string translation, the slug is in the strong-testimonials domain, not WordPress. Search for an exact match on “testimonial”.

    https://www.screencast.com/t/VEsWnzhrq

    I will work on fixing the link to behave as WPML does for posts.

    To complicate matters, I intend to remove the plugin’s translation files in order to fetch up-to-date but partial translations from wordpress.org instead. I will test this in WPML and publish instructions if necessary.

    Thread Starter ianpurves

    (@ianpurves)

    Chris

    Just updated Testimonials and WPML and your update has worked – thanks that is brilliant.

    I followed your suggestion of translating the slug “erfahrungsbericht” back to “testimonial” and that works. Much easier than doing a “translation” which we wanted to avoid to keep authenticity of 3rd party text.

    As you mentioned I left “Custom posts slug translation options” disabled but the slug was being bypassed by WPML.

    All up and running … onwards 😉

    Thanks again
    Ian

    Plugin Contributor Chris Dillon

    (@cdillon27)

    Glad to hear it’s working. Thanks for following up.

    Cheers,
    Chris

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Odd behavior with “Read More” and WPML’ is closed to new replies.