Home › Forums › Pro Support › WPML and "Read more…" translation problems
- This topic has 34 replies, 4 voices, and was last updated 2 years, 10 months ago by
Tom.
-
AuthorPosts
-
April 28, 2019 at 2:32 pm #9045
Torbjörn
ParticipantWe’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:
Thanks
April 29, 2019 at 4:14 pm #9071Tom
KeymasterHi 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?
April 30, 2019 at 3:13 am #9077Torbjörn
ParticipantHi 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?
April 30, 2019 at 3:20 am #9079Torbjörn
ParticipantHi 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
April 30, 2019 at 3:28 am #9080Torbjörn
Participanthttps://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.
April 30, 2019 at 2:31 pm #9084Tom
KeymasterCertainly 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.May 2, 2019 at 11:14 am #9100Torbjörn
ParticipantHi 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.
May 2, 2019 at 2:49 pm #9103Tom
KeymasterIt 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.
October 6, 2020 at 2:01 am #20728Gary
ParticipantWas 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.
October 9, 2020 at 9:35 am #20855Tom
KeymasterDid you try the solution I posted above?: https://wpshowposts.com/support/topic/wpml-and-read-more-translation-problems/#post-9084
Let us know 🙂
October 9, 2020 at 10:29 pm #20899Gary
ParticipantHi 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.
October 11, 2020 at 12:10 pm #20974Samuel
ParticipantHi,
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.
October 11, 2020 at 12:17 pm #20978Samuel
ParticipantI contacted support, you can follow conversation here : https://wpml.org/forums/topic/read-more-button-with-wp-show-post/#post-7207751
October 13, 2020 at 11:07 am #21100Tom
KeymasterIt’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.
October 14, 2020 at 8:50 am #21137Samuel
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/
-
AuthorPosts
- You must be logged in to reply to this topic.