Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Client was unable to find the "Last update" string in the string translation to translate it to Vietnamese. This string is from "dynamic text" from the generateblocks plugin.

Solution:
We provided an XML code to include the texts for translation. We instructed the client to navigate to WPML -> Settings -> Custom XML Configuration and add the following code:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="generateblocks/headline" translate="1">
      <key name="gpDynamicTextBefore"></key>
      <key name="gpDynamicUpdatedDateBefore"></key>
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

After adding the code, the client should make a minor modification to the element containing the 'Last Update:' text, save it, and update its translation. The texts will then be available for translation and should be visible on the front end.

If you're experiencing this issue, we recommend you try the provided solution. However, this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking related 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 with us.

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.

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 2 months ago.

Assisted by: Mateus Getulio.

Author Posts
March 7, 2024 at 1:11 pm

robinB-8

In this page (vietnamese): hidden link

"Last update" string, I can not find it in string translation to translate to vietnamese

This string is from "dynamic text" from generateblocks plugin

March 7, 2024 at 1:43 pm
March 7, 2024 at 2:34 pm
March 7, 2024 at 2:39 pm #15384934

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I suspect the issue could be related to compatibility between Generateblocks and WPML. To pinpoint the exact cause, we need to isolate variables by replicating the issue in a sandbox environment.

Here's what is needed to be done:

1- Install Essential Components Only: In the sandbox provided in my private reply above, please install your theme and only the plugins necessary to replicate the issue. Avoid importing the entire site.

2- Set Up the Page and Configurations: Mirror your current setup that's causing the issue, focusing on the dynamic text, we only need the site to be partially replicated up to a point where we can debug this issue.

3- Notify Us Once Done: After replicating the issue in the sandbox, inform us through this ticket so we can proceed with further analysis.

The goal here is to identify if the problem is indeed a compatibility issue, reproducing it in a controlled environment.

We appreciate your cooperation in this matter. Let us know once you've set up the sandbox.

Best,

Mateus

March 8, 2024 at 12:00 am #15387048

robinB-8

done

I created a element from generatepress at here: hidden link

and a post that use element above: hidden link

March 8, 2024 at 2:36 pm #15389873

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi,

Thank you for replicating the issue in the sandbox.

I have escalated this ticket to our Compatibility team where our specialists will take a deeper look at this issue and will try to find a solution.

I will get back to you as soon as I get an answer from them.

Best regards,
Mateus

March 14, 2024 at 8:14 pm #15412368

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for your patience while we investigated this.

Upon further inspection, our compatibility team was able to make a XML code to include those texts for translation, I tested it on the sandbox and it worked fine.

Please go to WPML -> Settings -> Custom XML Configuration and add the following code:

<wpml-config>
  <gutenberg-blocks>
    <gutenberg-block type="generateblocks/headline" translate="1">
      <key name="gpDynamicTextBefore" />
      <key name="gpDynamicUpdatedDateBefore" />
    </gutenberg-block>
  </gutenberg-blocks>
</wpml-config>

Then make a minor modification to the element containing the 'Last Update:' text. Save and update its translation. The Texts will be available for translation now.

You should be able to see the translated texts on the front end now.

Thank you, please give it a try and let us know.
Mateus

March 17, 2024 at 1:09 pm #15418358

robinB-8

Thanks, I can translated Last Update:

But I still have a same issue. I installed "fixed toc" plugin (this is table of contents plugin)

In this post: hidden link

I want to translate "Contents" word, but I can not find it in "string translation"

Please fix for me.

And can you tell me how can find key names in:
<key name="gpDynamicTextBefore" />
<key name="gpDynamicUpdatedDateBefore" />

March 17, 2024 at 10:55 pm #15418931

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Regarding the custom XML code, I gathered some documentation that will help you understand the process:

https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/
https://wpml.org/documentation/support/language-configuration-files/https://wpml.org/documentation/support/language-configuration-files/custom-fields-translation-options/

Also, as the original issue is resolved may I kindly ask you please to open a new ticket for this question?

This will also help other users with similar problems find solutions when searching the forum as well as we avoid mixing lots of questions in one ticket.

Thank you for your understanding.
Mateus