Home›Support›English Support›[Resolved] WP Post Query Block's "Read more" text is not translatable in Advanced Translation Editor, doesn...
[Resolved] WP Post Query Block's "Read more" text is not translatable in Advanced Translation Editor, doesn...
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was unable to translate the "Read more" text in a WP Post Query Block using the Advanced Translation Editor (ATE). The text was not appearing as translatable in the ATE, and any changes made in the classic editor were reverted when the ATE was used.
Solution: We recommended adding a custom XML configuration to make the "Read more" text translatable. Here are the steps we suggested: 1. Navigate to WPML -> Settings -> Custom XML Configuration. 2. Add the following code and save:
3. Make a minor edit to the original page to trigger a "needs update" status for the translation. 4. Open the translation editor to check if the string now appears for translation.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Please apologize, I wasn't clear enough. I am sorry.
What I meant was:
- In the root folder of the child theme
- Create a file with the name: wpml-config.xml
- Add to it the same content that was added before in WPML > Settings > Custom Configuration file
In any case, I'll take a look at the testing file. Thanks for your cooperation!
I created a new page in the test site with a query loop with the read more link.
The Read more text didn't appear in the translation editor, but appeared translated in the front end. This is probably because the default "Read more" string is hardcoded in the theme and translated with the .mo files.
I'm not sure I understand this. The "Read more" is editable on the page - the phrase is meant to be entered in that spot when setting up the query loop block. It is not a 'set in stone' phrase that would be in an .mo file, no? Or do I misunderstand how .mo files work?
On our side, we also tested using a default theme on a totally clean install, as well as in our original Genesis theme and got the same result.
Plus, this is a WordPress block that is available in any theme.
Can WPML make this text a string that can be translated, or provide some solution for it to be translatable in the ATE?
However, this takes us back to earlier conversations in this thread.
The problem we are running into is that yes, the "Read more" can show in the ATE but only after changing the "Read more" text in its original language. That is the problem. We can't use the original "Read more" text.
This was discussed in previous messages, as well as the results of our own tests on a clean install (which I'm still happy to give you access to).
This is not isolated to a custom theme or block; it is the native WordPress query loop block. Our tests on a clean install show that it happens with native WP posts, not just custom post types, on an almost empty child theme.
Can WPML allow the "Read more" text to be translatable in the ATE or as a string without having to change the English in any way?
Can WPML fully integrate with the native WordPress query loop block?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
After adding a custom XML config the original string always needs to be edited. Usually adding a blank space behind the text and saving the page again is sufficient for that.
Can you please confirm if this solves the issue, as our compatilbity is waiting for confirmation?
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
It usually will not require any editing.
The editing was necessary as at the moment this string is not supported inside the XML configuration and after adding such config the string needs to be edited so that WPML can read it.
The compatilbity team will now take care of updating the XML config for this widget.