[Support request] WPML and "Read more…" translation problems

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support WPML and "Read more…" translation problems

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #9045
    Torbjörn
    Participant

    We’re using WPML and WP Show Posts (WPSP). When it comes to content, WPSP works fine with WPML and only renders posts using the correct locale/language. However I can’t find a way to get the translation of the read more button to work so I wonder if WPSP really supports WPML in this case. If it doesn’t, please make it do, it’s really important for anyone using WPSP with WPML.

    I know there’s a possible workaround (create a new list per language) but in practice it would be impossible to maintain.

    Here’s what the WPML translation page looks like: WPML for WPSP

    Thanks

    #9071
    Tom
    Keymaster

    Hi there,

    That’s strange – it should work by default. It looks like the setting exists in WPML as well from your screenshot. How is it displaying right now? As “Read more…” regardless of translation?

    #9077
    Torbjörn
    Participant

    Hi Tom,

    The base language of the site is Swedish so the WP Show Posts list in question has “Läs mer…” as the entry in the “Read more text” box under “Content”. WPML did not pick this entry up at all, i.e. it was not translatable which makes me think it’s actually a problem with the plugin. What I did was use the WPML function “Make ‘Post Lists’ translatable” and checked the wpsp_read_more_text field name as “translatable”. So as you can see above, I get to fill that entry in the translation editor. Somehow it does not work when the page is rendered though. I’m a bit at a loss – it could be a WPSP problem (my guess because I should not need to use the WPML “hack” to accomplish this) but the problem might well be in WPML (or even somewhere between my keyboard and my chair lol). It’s a custom field after all and the best would have been if WPML could have picked it up somehow. It’s not that WPSP if full of stuff that needs translation – this is the only place, right?

    Do you have any advice?

    #9079
    Torbjörn
    Participant

    Hi again Tom – I know you know WPML, we’re using GP as our theme and that works like a charm with 4 languages so far.
    Still, maybe this is a hint?

    https://wpml.org/documentation/support/language-configuration-files/

    Cheers, Torbjorn

    #9080
    Torbjörn
    Participant

    https://wpml.org/documentation/support/language-configuration-files/#custom-fields

    Sorry for multiple posts – I was unable to edit my previous post. The above link takes you directly to the relevant section.

    #9084
    Tom
    Keymaster

    Certainly worth a shot.

    Create a new file and name it wpml-config.xml and add this as the content:

    <wpml-config>
        <custom-fields>
            <custom-field action="translate">wpsp_read_more_text</custom-field>
        </custom-fields>
    </wpml-config>

    Then upload it to the wp-show-posts folder.

    #9100
    Torbjörn
    Participant

    Hi Tom,

    Sorry for being slow in responding – I tried to post a reply yesterday but got an error msg from your database.

    Anyway – thanks, unfortunately, it did not work. I’ve just had time for a quick test, over the weekend I might have more time to dig into this and maybe contact the WPML support, too. I can’t say I understand exactly how things are supposed to look even when they’re working, so to speak. All I can see it that the custom field of that custom post type does not get picked up by the WPML translation editor, and when I “force it” to, it ignores it somehow.

    Maybe this has something to do with it: https://wpml.org/faq/how-to-translate-custom-types/ i.e. you have to “do the right thing” in the plugin somehow.

    So I’ll have to get back to you with more information and/or questions in a few days (or more). If you come up with something please let me know :).

    Thanks for the quick response.

    #9103
    Tom
    Keymaster

    It may be worth checking with them. There might be something simple we need to do in the plugin – I’m just not familiar enough with WPML to know.

    #20728
    Gary
    Participant

    Was this ever resolved?

    I am having the same problem. I have tried to find where to translate this ‘Read More’ button in all kinds of places, including strings, but absolutely no luck.

    #20855
    Tom
    Keymaster

    Did you try the solution I posted above?: https://wpshowposts.com/support/topic/wpml-and-read-more-translation-problems/#post-9084

    Let us know 🙂

    #20899
    Gary
    Participant

    Hi Tom,

    Yes, I tried it. But sadly it only 50% works. Using the xml file above, it definitely gets found in WPML Advanced Translation Editor (ATE). Without the code, it doesn’t even get found. However, despite translating the Read More in the ATE, the translation does not get reproduced in the frontend.

    #20974
    Samuel
    Participant

    Hi,

    I have same problem here.

    I’m going to contact WPML support but not sure how to explain them the problem.

    Let you know if I have some news.

    #20978
    Samuel
    Participant

    I contacted support, you can follow conversation here : https://wpml.org/forums/topic/read-more-button-with-wp-show-post/#post-7207751

    #21100
    Tom
    Keymaster

    It’s a custom field, which is why the above should work: https://wpshowposts.com/support/topic/wpml-and-read-more-translation-problems/#post-9084

    Interested to know why it wouldn’t work on the frontend – might be something we need to tweak.

    #21137
    Samuel
    Participant

    @Tom what this config is suppose to solve ? I added it and don’t know what to do next.

    In the WPML administration there is possibility to translate strings, but this only translate the “admin message” inside WPSP, like “Read more text” or “Read more button class” but the backend part, not what’s inside the button frontend as you’ll see here : https://pasteboard.co/JvCQmdL.png

    I translated string “Read more text” with “TEST” and it’s displaying backend obviously.

    Here is a page where you can see the translation issue : texte is in spanish and button is still in French as there is no way to translate it : https://miviajeporcolombia.com/test-22/

Viewing 15 posts - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.