Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 -
- 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Nicolas V. 1 year, 2 months ago.

Assisted by: Nicolas V..

Author Posts
September 7, 2023 at 3:06 pm #14360987

mariannaF-4

hidden link

September 8, 2023 at 2:59 pm #14367587

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Welcome to the WPML support forum. Could you please give me more details about that "Show more" button?
1. Does it comes from your theme?
If so, you should be able to translate it in "WPML > String Translation"
2. Is it coming from a custom code?
- In that case make sure that you use functions such as __() or _e()
- Go to "WPML > Theme and plugins localization" to rescan your theme
- Go to "WPML > String Translation" to translate it

September 8, 2023 at 3:33 pm #14367667

mariannaF-4

I translated the string in String Translation but its still only showing up in english.

September 8, 2023 at 7:29 pm #14368439

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

Could you please provide me with a temporary admin access (wp-admin and FTP) – preferably to a test site where the issue has been replicated – so I can further investigate. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.

IMPORTANT: Before we proceed, please backup your site and database.

Nico

September 13, 2023 at 7:53 pm #14392441

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi,

I spent quite some time on your site and understood the structure. This is a grid layout coming from the core plugin of your theme. I also find the PHP where the "Show more" button is display but instead of using a translatable text it's using a variable to get the button text.

'<button class="collapsible-content-more">' . strip_tags( $show_more_toggle_text_more ) . '</button>';

The text you translated in "WPML > String Translation" is the default text, not the one that you can customize in the grid. If I had a dot at the end "Show more." I don't see the change in "String Translation".

I would need more time to investigate the plugin's code. In the meantime, if you could contact their support to see if they have a quick solution.

September 13, 2023 at 8:28 pm #14392527

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hi again,

I made a video because I found a "workaround" but it's not the most practical way to translate a text.

It seems that this plugin saves all the options into a JSON file. When you translate a grid, you can search for "Show more" and you will see this file. You can then copy the same JSON into your translation and edit the "show_more_toggle_text_more" and "show_more_toggle_text_less" values.

Here is the video: hidden link

September 20, 2023 at 5:40 pm #14432773

mariannaF-4

I added a dot on the english site and its being displayed on the front end.

September 20, 2023 at 5:56 pm #14432785

mariannaF-4

thought?

September 20, 2023 at 9:36 pm #14433667

Nicolas V.
Supporter

Languages: English (English ) French (Français )

Timezone: America/Lima (GMT-05:00)

Hello,

I'm not sure to understand your question? So, just to clarify:
- I added the dot in the English grid so to see if the "Show more" text in "WPML > String Translation" was the same text. That confirmed me that there were two different texts because the text in string translation didn't change (not dot). So, we were translating the wrong text in String Translation.
That was to identify the issue. The question was "I translated the text in String Translation but it's not showing on the frontend". And the answer to that, after doing this simple test, was "it's because they are two different texts".

Now if you add the dot, in the English grid it will show on frontend. You can go back to "Grid layouts" and edit the "Article" grid. Click to edit the "Post Content" and in "More Options" you can remove dots from your texts and save.

The important thing hin the video is how to translate the text inside that JSON file. Let me know if you have questions about that.

I hope it makes more sense now.

The topic ‘[Closed] translate the "show more" string in a blog style page’ is closed to new replies.